using System;
using System.Data;
using System.Collections;
using System.IO;
using System.Windows.Forms;
using C1.Win.C1TrueDBGrid;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.PCSExc;
using PCSUtils.Framework.ReportFrame;
using PCSUtils.Log;
using PCSUtils.Utils;
using PCSComMaterials.Inventory.BO;
using PCSComMaterials.ActualCost.BO;
using PCSComMaterials.ActualCost.DS;

namespace PCSMaterials.ActualCost
{
	/// <summary>
	/// Summary description for RecoverableMaterial.
	/// </summary>
	public class RecoverableMaterial : System.Windows.Forms.Form
	{
		private C1.Win.C1TrueDBGrid.C1TrueDBGrid dgrdData;
		private System.Windows.Forms.Button btnPrint;
		private System.Windows.Forms.Button btnSave;
		private System.Windows.Forms.Button btnAdd;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox txtRevision;
		private System.Windows.Forms.TextBox txtDescription;
		private System.Windows.Forms.TextBox txtCode;
		private System.Windows.Forms.Button btnSearchProductDescription;
		private System.Windows.Forms.Label lblDescription;
		private System.Windows.Forms.Label lblRevision;
		private System.Windows.Forms.Button btnSearchProductCode;
		private System.Windows.Forms.Label lblCode;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Button btnHelp;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.TextBox txtOrderNo;
		private System.Windows.Forms.Button btnOrderNo;
		private System.Windows.Forms.Label lblCCN;
		private System.Windows.Forms.Label lblOrderNo;
		private System.Windows.Forms.Label lblTransDate;
		private C1.Win.C1List.C1Combo cboCCN;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox txtLocation;
		private System.Windows.Forms.TextBox txtBin;
		private C1.Win.C1Input.C1NumericEdit txtQuantity;
		private C1.Win.C1Input.C1NumericEdit txtAvailable;
		private System.Windows.Forms.Button btnLocation;
		private System.Windows.Forms.Button btnBin;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private const string THIS = "PCSMaterials.ActualCost.RecoverableMaterial";
		private C1.Win.C1Input.C1DateEdit dtmPostDate;
		private const string CUSTOMER = "Customer";
		private const string V_VENDOR_CUSTOMER = "V_VendorCustomer";
		private const string RECOVERABLE_QTY = "Recoverable Quantity";
		private const string LOC_OR_VENDOR = "Location/Bin or Vendor";
		private const string VIEW_PRODUCTINFOR = "V_ProductInfor";
		private const string VIEW_RECOVERABLEMATERIALMASTER = "v_RecoverMaterialMaster";
		
		private const string PART_NUMBER = "PartNumber";
		private const string PART_NAME = "PartName";
		private const string MODEL = "Model";
		private const string UM = "UM";
		DateTime dtmCurrentDate = new DateTime();	
		DataTable dtbGridLayout;
		DataSet dstData;
		RecoverableMaterialBO boRecoverable = new RecoverableMaterialBO();
		private System.Windows.Forms.Label lblLocation;
		private EnumAction FormMode = EnumAction.Default;
		CST_RecoverMaterialMasterVO voRecoverMaterialMaster = new CST_RecoverMaterialMasterVO();
		bool blnHasError = false;
		private C1.C1Report.C1Report rptSlip;
		private int intRecoverableMasterID = 0;
		public RecoverableMaterial()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(RecoverableMaterial));
			this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
			this.btnPrint = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.txtLocation = new System.Windows.Forms.TextBox();
			this.btnLocation = new System.Windows.Forms.Button();
			this.lblLocation = new System.Windows.Forms.Label();
			this.txtBin = new System.Windows.Forms.TextBox();
			this.btnBin = new System.Windows.Forms.Button();
			this.label2 = new System.Windows.Forms.Label();
			this.txtRevision = new System.Windows.Forms.TextBox();
			this.txtDescription = new System.Windows.Forms.TextBox();
			this.txtCode = new System.Windows.Forms.TextBox();
			this.btnSearchProductDescription = new System.Windows.Forms.Button();
			this.lblDescription = new System.Windows.Forms.Label();
			this.lblRevision = new System.Windows.Forms.Label();
			this.btnSearchProductCode = new System.Windows.Forms.Button();
			this.lblCode = new System.Windows.Forms.Label();
			this.txtQuantity = new C1.Win.C1Input.C1NumericEdit();
			this.label10 = new System.Windows.Forms.Label();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.dtmPostDate = new C1.Win.C1Input.C1DateEdit();
			this.txtOrderNo = new System.Windows.Forms.TextBox();
			this.btnOrderNo = new System.Windows.Forms.Button();
			this.lblCCN = new System.Windows.Forms.Label();
			this.lblOrderNo = new System.Windows.Forms.Label();
			this.lblTransDate = new System.Windows.Forms.Label();
			this.cboCCN = new C1.Win.C1List.C1Combo();
			this.txtAvailable = new C1.Win.C1Input.C1NumericEdit();
			this.label3 = new System.Windows.Forms.Label();
			this.rptSlip = new C1.C1Report.C1Report();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.txtQuantity)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.txtAvailable)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.rptSlip)).BeginInit();
			this.SuspendLayout();
			// 
			// dgrdData
			// 
			this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
			this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
			this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
			this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
			this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
			this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
			this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
			this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
			this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
			this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
			this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
			this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
			this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
			this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
			this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
			this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
			this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
			this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
			this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
			this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
			this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
			this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
			this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
			this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
			this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
			this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
			this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
			this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
			this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
			this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
			this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
			this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
			this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
			this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
			this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
			this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
			this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
			this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
			this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
			this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
			this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
			this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
			this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
			this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
			this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
			this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
			this.dgrdData.Name = "dgrdData";
			this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
			this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
			this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
			this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
			this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
			this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
			this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
			this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
			this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
			this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
			this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
			this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
			this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
			this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
			this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
			this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
			this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
			this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
			this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
			this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
			this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
			this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
			this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
			this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
			this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
			this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
			this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
			this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
			this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
			this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
			this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
			this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
			this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
			this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
			this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
			this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
			this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
			this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
			this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
			this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
			this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
			this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
			this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
			this.dgrdData.TabAction = C1.Win.C1TrueDBGrid.TabActionEnum.ColumnNavigation;
			this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
			this.dgrdData.Text = resources.GetString("dgrdData.Text");
			this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
			this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
			this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
			this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
			this.dgrdData.RowColChange += new C1.Win.C1TrueDBGrid.RowColChangeEventHandler(this.dgrdData_RowColChange);
			this.dgrdData.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_ButtonClick);
			this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
			this.dgrdData.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.dgrdData_BeforeColUpdate);
			this.dgrdData.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgrdData_KeyDown);
			this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
			// 
			// btnPrint
			// 
			this.btnPrint.AccessibleDescription = resources.GetString("btnPrint.AccessibleDescription");
			this.btnPrint.AccessibleName = resources.GetString("btnPrint.AccessibleName");
			this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPrint.Anchor")));
			this.btnPrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPrint.BackgroundImage")));
			this.btnPrint.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPrint.Dock")));
			this.btnPrint.Enabled = ((bool)(resources.GetObject("btnPrint.Enabled")));
			this.btnPrint.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPrint.FlatStyle")));
			this.btnPrint.Font = ((System.Drawing.Font)(resources.GetObject("btnPrint.Font")));
			this.btnPrint.Image = ((System.Drawing.Image)(resources.GetObject("btnPrint.Image")));
			this.btnPrint.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.ImageAlign")));
			this.btnPrint.ImageIndex = ((int)(resources.GetObject("btnPrint.ImageIndex")));
			this.btnPrint.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPrint.ImeMode")));
			this.btnPrint.Location = ((System.Drawing.Point)(resources.GetObject("btnPrint.Location")));
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPrint.RightToLeft")));
			this.btnPrint.Size = ((System.Drawing.Size)(resources.GetObject("btnPrint.Size")));
			this.btnPrint.TabIndex = ((int)(resources.GetObject("btnPrint.TabIndex")));
			this.btnPrint.Text = resources.GetString("btnPrint.Text");
			this.btnPrint.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.TextAlign")));
			this.btnPrint.Visible = ((bool)(resources.GetObject("btnPrint.Visible")));
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// btnSave
			// 
			this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
			this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
			this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
			this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
			this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
			this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
			this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
			this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
			this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
			this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
			this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
			this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
			this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
			this.btnSave.Name = "btnSave";
			this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
			this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
			this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
			this.btnSave.Text = resources.GetString("btnSave.Text");
			this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
			this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// btnAdd
			// 
			this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
			this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
			this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
			this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
			this.btnAdd.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
			this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
			this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
			this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
			this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
			this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
			this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
			this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
			this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
			this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
			this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
			this.btnAdd.Text = resources.GetString("btnAdd.Text");
			this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
			this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
			this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
			// 
			// txtLocation
			// 
			this.txtLocation.AccessibleDescription = resources.GetString("txtLocation.AccessibleDescription");
			this.txtLocation.AccessibleName = resources.GetString("txtLocation.AccessibleName");
			this.txtLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtLocation.Anchor")));
			this.txtLocation.AutoSize = ((bool)(resources.GetObject("txtLocation.AutoSize")));
			this.txtLocation.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtLocation.BackgroundImage")));
			this.txtLocation.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtLocation.Dock")));
			this.txtLocation.Enabled = ((bool)(resources.GetObject("txtLocation.Enabled")));
			this.txtLocation.Font = ((System.Drawing.Font)(resources.GetObject("txtLocation.Font")));
			this.txtLocation.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtLocation.ImeMode")));
			this.txtLocation.Location = ((System.Drawing.Point)(resources.GetObject("txtLocation.Location")));
			this.txtLocation.MaxLength = ((int)(resources.GetObject("txtLocation.MaxLength")));
			this.txtLocation.Multiline = ((bool)(resources.GetObject("txtLocation.Multiline")));
			this.txtLocation.Name = "txtLocation";
			this.txtLocation.PasswordChar = ((char)(resources.GetObject("txtLocation.PasswordChar")));
			this.txtLocation.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtLocation.RightToLeft")));
			this.txtLocation.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtLocation.ScrollBars")));
			this.txtLocation.Size = ((System.Drawing.Size)(resources.GetObject("txtLocation.Size")));
			this.txtLocation.TabIndex = ((int)(resources.GetObject("txtLocation.TabIndex")));
			this.txtLocation.Text = resources.GetString("txtLocation.Text");
			this.txtLocation.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtLocation.TextAlign")));
			this.txtLocation.Visible = ((bool)(resources.GetObject("txtLocation.Visible")));
			this.txtLocation.WordWrap = ((bool)(resources.GetObject("txtLocation.WordWrap")));
			this.txtLocation.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtLocation_KeyDown);
			this.txtLocation.Validating += new System.ComponentModel.CancelEventHandler(this.txtLocation_Validating);
			// 
			// btnLocation
			// 
			this.btnLocation.AccessibleDescription = resources.GetString("btnLocation.AccessibleDescription");
			this.btnLocation.AccessibleName = resources.GetString("btnLocation.AccessibleName");
			this.btnLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnLocation.Anchor")));
			this.btnLocation.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnLocation.BackgroundImage")));
			this.btnLocation.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnLocation.Dock")));
			this.btnLocation.Enabled = ((bool)(resources.GetObject("btnLocation.Enabled")));
			this.btnLocation.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnLocation.FlatStyle")));
			this.btnLocation.Font = ((System.Drawing.Font)(resources.GetObject("btnLocation.Font")));
			this.btnLocation.Image = ((System.Drawing.Image)(resources.GetObject("btnLocation.Image")));
			this.btnLocation.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnLocation.ImageAlign")));
			this.btnLocation.ImageIndex = ((int)(resources.GetObject("btnLocation.ImageIndex")));
			this.btnLocation.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnLocation.ImeMode")));
			this.btnLocation.Location = ((System.Drawing.Point)(resources.GetObject("btnLocation.Location")));
			this.btnLocation.Name = "btnLocation";
			this.btnLocation.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnLocation.RightToLeft")));
			this.btnLocation.Size = ((System.Drawing.Size)(resources.GetObject("btnLocation.Size")));
			this.btnLocation.TabIndex = ((int)(resources.GetObject("btnLocation.TabIndex")));
			this.btnLocation.Text = resources.GetString("btnLocation.Text");
			this.btnLocation.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnLocation.TextAlign")));
			this.btnLocation.Visible = ((bool)(resources.GetObject("btnLocation.Visible")));
			this.btnLocation.Click += new System.EventHandler(this.btnLocation_Click);
			// 
			// lblLocation
			// 
			this.lblLocation.AccessibleDescription = resources.GetString("lblLocation.AccessibleDescription");
			this.lblLocation.AccessibleName = resources.GetString("lblLocation.AccessibleName");
			this.lblLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblLocation.Anchor")));
			this.lblLocation.AutoSize = ((bool)(resources.GetObject("lblLocation.AutoSize")));
			this.lblLocation.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblLocation.Dock")));
			this.lblLocation.Enabled = ((bool)(resources.GetObject("lblLocation.Enabled")));
			this.lblLocation.Font = ((System.Drawing.Font)(resources.GetObject("lblLocation.Font")));
			this.lblLocation.ForeColor = System.Drawing.Color.Maroon;
			this.lblLocation.Image = ((System.Drawing.Image)(resources.GetObject("lblLocation.Image")));
			this.lblLocation.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblLocation.ImageAlign")));
			this.lblLocation.ImageIndex = ((int)(resources.GetObject("lblLocation.ImageIndex")));
			this.lblLocation.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblLocation.ImeMode")));
			this.lblLocation.Location = ((System.Drawing.Point)(resources.GetObject("lblLocation.Location")));
			this.lblLocation.Name = "lblLocation";
			this.lblLocation.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblLocation.RightToLeft")));
			this.lblLocation.Size = ((System.Drawing.Size)(resources.GetObject("lblLocation.Size")));
			this.lblLocation.TabIndex = ((int)(resources.GetObject("lblLocation.TabIndex")));
			this.lblLocation.Text = resources.GetString("lblLocation.Text");
			this.lblLocation.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblLocation.TextAlign")));
			this.lblLocation.Visible = ((bool)(resources.GetObject("lblLocation.Visible")));
			// 
			// txtBin
			// 
			this.txtBin.AccessibleDescription = resources.GetString("txtBin.AccessibleDescription");
			this.txtBin.AccessibleName = resources.GetString("txtBin.AccessibleName");
			this.txtBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtBin.Anchor")));
			this.txtBin.AutoSize = ((bool)(resources.GetObject("txtBin.AutoSize")));
			this.txtBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtBin.BackgroundImage")));
			this.txtBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtBin.Dock")));
			this.txtBin.Enabled = ((bool)(resources.GetObject("txtBin.Enabled")));
			this.txtBin.Font = ((System.Drawing.Font)(resources.GetObject("txtBin.Font")));
			this.txtBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtBin.ImeMode")));
			this.txtBin.Location = ((System.Drawing.Point)(resources.GetObject("txtBin.Location")));
			this.txtBin.MaxLength = ((int)(resources.GetObject("txtBin.MaxLength")));
			this.txtBin.Multiline = ((bool)(resources.GetObject("txtBin.Multiline")));
			this.txtBin.Name = "txtBin";
			this.txtBin.PasswordChar = ((char)(resources.GetObject("txtBin.PasswordChar")));
			this.txtBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtBin.RightToLeft")));
			this.txtBin.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtBin.ScrollBars")));
			this.txtBin.Size = ((System.Drawing.Size)(resources.GetObject("txtBin.Size")));
			this.txtBin.TabIndex = ((int)(resources.GetObject("txtBin.TabIndex")));
			this.txtBin.Text = resources.GetString("txtBin.Text");
			this.txtBin.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtBin.TextAlign")));
			this.txtBin.Visible = ((bool)(resources.GetObject("txtBin.Visible")));
			this.txtBin.WordWrap = ((bool)(resources.GetObject("txtBin.WordWrap")));
			this.txtBin.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBin_KeyDown);
			this.txtBin.Validating += new System.ComponentModel.CancelEventHandler(this.txtBin_Validating);
			// 
			// btnBin
			// 
			this.btnBin.AccessibleDescription = resources.GetString("btnBin.AccessibleDescription");
			this.btnBin.AccessibleName = resources.GetString("btnBin.AccessibleName");
			this.btnBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnBin.Anchor")));
			this.btnBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnBin.BackgroundImage")));
			this.btnBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnBin.Dock")));
			this.btnBin.Enabled = ((bool)(resources.GetObject("btnBin.Enabled")));
			this.btnBin.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnBin.FlatStyle")));
			this.btnBin.Font = ((System.Drawing.Font)(resources.GetObject("btnBin.Font")));
			this.btnBin.Image = ((System.Drawing.Image)(resources.GetObject("btnBin.Image")));
			this.btnBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnBin.ImageAlign")));
			this.btnBin.ImageIndex = ((int)(resources.GetObject("btnBin.ImageIndex")));
			this.btnBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnBin.ImeMode")));
			this.btnBin.Location = ((System.Drawing.Point)(resources.GetObject("btnBin.Location")));
			this.btnBin.Name = "btnBin";
			this.btnBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnBin.RightToLeft")));
			this.btnBin.Size = ((System.Drawing.Size)(resources.GetObject("btnBin.Size")));
			this.btnBin.TabIndex = ((int)(resources.GetObject("btnBin.TabIndex")));
			this.btnBin.Text = resources.GetString("btnBin.Text");
			this.btnBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnBin.TextAlign")));
			this.btnBin.Visible = ((bool)(resources.GetObject("btnBin.Visible")));
			this.btnBin.Click += new System.EventHandler(this.btnBin_Click);
			// 
			// label2
			// 
			this.label2.AccessibleDescription = resources.GetString("label2.AccessibleDescription");
			this.label2.AccessibleName = resources.GetString("label2.AccessibleName");
			this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label2.Anchor")));
			this.label2.AutoSize = ((bool)(resources.GetObject("label2.AutoSize")));
			this.label2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label2.Dock")));
			this.label2.Enabled = ((bool)(resources.GetObject("label2.Enabled")));
			this.label2.Font = ((System.Drawing.Font)(resources.GetObject("label2.Font")));
			this.label2.ForeColor = System.Drawing.Color.Maroon;
			this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image")));
			this.label2.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.ImageAlign")));
			this.label2.ImageIndex = ((int)(resources.GetObject("label2.ImageIndex")));
			this.label2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label2.ImeMode")));
			this.label2.Location = ((System.Drawing.Point)(resources.GetObject("label2.Location")));
			this.label2.Name = "label2";
			this.label2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label2.RightToLeft")));
			this.label2.Size = ((System.Drawing.Size)(resources.GetObject("label2.Size")));
			this.label2.TabIndex = ((int)(resources.GetObject("label2.TabIndex")));
			this.label2.Text = resources.GetString("label2.Text");
			this.label2.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.TextAlign")));
			this.label2.Visible = ((bool)(resources.GetObject("label2.Visible")));
			// 
			// txtRevision
			// 
			this.txtRevision.AccessibleDescription = resources.GetString("txtRevision.AccessibleDescription");
			this.txtRevision.AccessibleName = resources.GetString("txtRevision.AccessibleName");
			this.txtRevision.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtRevision.Anchor")));
			this.txtRevision.AutoSize = ((bool)(resources.GetObject("txtRevision.AutoSize")));
			this.txtRevision.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtRevision.BackgroundImage")));
			this.txtRevision.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.txtRevision.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtRevision.Dock")));
			this.txtRevision.Enabled = ((bool)(resources.GetObject("txtRevision.Enabled")));
			this.txtRevision.Font = ((System.Drawing.Font)(resources.GetObject("txtRevision.Font")));
			this.txtRevision.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtRevision.ImeMode")));
			this.txtRevision.Location = ((System.Drawing.Point)(resources.GetObject("txtRevision.Location")));
			this.txtRevision.MaxLength = ((int)(resources.GetObject("txtRevision.MaxLength")));
			this.txtRevision.Multiline = ((bool)(resources.GetObject("txtRevision.Multiline")));
			this.txtRevision.Name = "txtRevision";
			this.txtRevision.PasswordChar = ((char)(resources.GetObject("txtRevision.PasswordChar")));
			this.txtRevision.ReadOnly = true;
			this.txtRevision.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtRevision.RightToLeft")));
			this.txtRevision.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtRevision.ScrollBars")));
			this.txtRevision.Size = ((System.Drawing.Size)(resources.GetObject("txtRevision.Size")));
			this.txtRevision.TabIndex = ((int)(resources.GetObject("txtRevision.TabIndex")));
			this.txtRevision.Text = resources.GetString("txtRevision.Text");
			this.txtRevision.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtRevision.TextAlign")));
			this.txtRevision.Visible = ((bool)(resources.GetObject("txtRevision.Visible")));
			this.txtRevision.WordWrap = ((bool)(resources.GetObject("txtRevision.WordWrap")));
			// 
			// txtDescription
			// 
			this.txtDescription.AccessibleDescription = resources.GetString("txtDescription.AccessibleDescription");
			this.txtDescription.AccessibleName = resources.GetString("txtDescription.AccessibleName");
			this.txtDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtDescription.Anchor")));
			this.txtDescription.AutoSize = ((bool)(resources.GetObject("txtDescription.AutoSize")));
			this.txtDescription.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtDescription.BackgroundImage")));
			this.txtDescription.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.txtDescription.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtDescription.Dock")));
			this.txtDescription.Enabled = ((bool)(resources.GetObject("txtDescription.Enabled")));
			this.txtDescription.Font = ((System.Drawing.Font)(resources.GetObject("txtDescription.Font")));
			this.txtDescription.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtDescription.ImeMode")));
			this.txtDescription.Location = ((System.Drawing.Point)(resources.GetObject("txtDescription.Location")));
			this.txtDescription.MaxLength = ((int)(resources.GetObject("txtDescription.MaxLength")));
			this.txtDescription.Multiline = ((bool)(resources.GetObject("txtDescription.Multiline")));
			this.txtDescription.Name = "txtDescription";
			this.txtDescription.PasswordChar = ((char)(resources.GetObject("txtDescription.PasswordChar")));
			this.txtDescription.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtDescription.RightToLeft")));
			this.txtDescription.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtDescription.ScrollBars")));
			this.txtDescription.Size = ((System.Drawing.Size)(resources.GetObject("txtDescription.Size")));
			this.txtDescription.TabIndex = ((int)(resources.GetObject("txtDescription.TabIndex")));
			this.txtDescription.Text = resources.GetString("txtDescription.Text");
			this.txtDescription.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtDescription.TextAlign")));
			this.txtDescription.Visible = ((bool)(resources.GetObject("txtDescription.Visible")));
			this.txtDescription.WordWrap = ((bool)(resources.GetObject("txtDescription.WordWrap")));
			this.txtDescription.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDescription_KeyDown);
			this.txtDescription.Validating += new System.ComponentModel.CancelEventHandler(this.txtDescription_Validating);
			// 
			// txtCode
			// 
			this.txtCode.AccessibleDescription = resources.GetString("txtCode.AccessibleDescription");
			this.txtCode.AccessibleName = resources.GetString("txtCode.AccessibleName");
			this.txtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtCode.Anchor")));
			this.txtCode.AutoSize = ((bool)(resources.GetObject("txtCode.AutoSize")));
			this.txtCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtCode.BackgroundImage")));
			this.txtCode.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.txtCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtCode.Dock")));
			this.txtCode.Enabled = ((bool)(resources.GetObject("txtCode.Enabled")));
			this.txtCode.Font = ((System.Drawing.Font)(resources.GetObject("txtCode.Font")));
			this.txtCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtCode.ImeMode")));
			this.txtCode.Location = ((System.Drawing.Point)(resources.GetObject("txtCode.Location")));
			this.txtCode.MaxLength = ((int)(resources.GetObject("txtCode.MaxLength")));
			this.txtCode.Multiline = ((bool)(resources.GetObject("txtCode.Multiline")));
			this.txtCode.Name = "txtCode";
			this.txtCode.PasswordChar = ((char)(resources.GetObject("txtCode.PasswordChar")));
			this.txtCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtCode.RightToLeft")));
			this.txtCode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtCode.ScrollBars")));
			this.txtCode.Size = ((System.Drawing.Size)(resources.GetObject("txtCode.Size")));
			this.txtCode.TabIndex = ((int)(resources.GetObject("txtCode.TabIndex")));
			this.txtCode.Text = resources.GetString("txtCode.Text");
			this.txtCode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtCode.TextAlign")));
			this.txtCode.Visible = ((bool)(resources.GetObject("txtCode.Visible")));
			this.txtCode.WordWrap = ((bool)(resources.GetObject("txtCode.WordWrap")));
			this.txtCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown);
			this.txtCode.Validating += new System.ComponentModel.CancelEventHandler(this.txtCode_Validating);
			// 
			// btnSearchProductDescription
			// 
			this.btnSearchProductDescription.AccessibleDescription = resources.GetString("btnSearchProductDescription.AccessibleDescription");
			this.btnSearchProductDescription.AccessibleName = resources.GetString("btnSearchProductDescription.AccessibleName");
			this.btnSearchProductDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSearchProductDescription.Anchor")));
			this.btnSearchProductDescription.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearchProductDescription.BackgroundImage")));
			this.btnSearchProductDescription.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSearchProductDescription.Dock")));
			this.btnSearchProductDescription.Enabled = ((bool)(resources.GetObject("btnSearchProductDescription.Enabled")));
			this.btnSearchProductDescription.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSearchProductDescription.FlatStyle")));
			this.btnSearchProductDescription.Font = ((System.Drawing.Font)(resources.GetObject("btnSearchProductDescription.Font")));
			this.btnSearchProductDescription.Image = ((System.Drawing.Image)(resources.GetObject("btnSearchProductDescription.Image")));
			this.btnSearchProductDescription.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchProductDescription.ImageAlign")));
			this.btnSearchProductDescription.ImageIndex = ((int)(resources.GetObject("btnSearchProductDescription.ImageIndex")));
			this.btnSearchProductDescription.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSearchProductDescription.ImeMode")));
			this.btnSearchProductDescription.Location = ((System.Drawing.Point)(resources.GetObject("btnSearchProductDescription.Location")));
			this.btnSearchProductDescription.Name = "btnSearchProductDescription";
			this.btnSearchProductDescription.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSearchProductDescription.RightToLeft")));
			this.btnSearchProductDescription.Size = ((System.Drawing.Size)(resources.GetObject("btnSearchProductDescription.Size")));
			this.btnSearchProductDescription.TabIndex = ((int)(resources.GetObject("btnSearchProductDescription.TabIndex")));
			this.btnSearchProductDescription.Text = resources.GetString("btnSearchProductDescription.Text");
			this.btnSearchProductDescription.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchProductDescription.TextAlign")));
			this.btnSearchProductDescription.Visible = ((bool)(resources.GetObject("btnSearchProductDescription.Visible")));
			this.btnSearchProductDescription.Click += new System.EventHandler(this.btnSearchProductDescription_Click);
			// 
			// lblDescription
			// 
			this.lblDescription.AccessibleDescription = resources.GetString("lblDescription.AccessibleDescription");
			this.lblDescription.AccessibleName = resources.GetString("lblDescription.AccessibleName");
			this.lblDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDescription.Anchor")));
			this.lblDescription.AutoSize = ((bool)(resources.GetObject("lblDescription.AutoSize")));
			this.lblDescription.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDescription.Dock")));
			this.lblDescription.Enabled = ((bool)(resources.GetObject("lblDescription.Enabled")));
			this.lblDescription.Font = ((System.Drawing.Font)(resources.GetObject("lblDescription.Font")));
			this.lblDescription.ForeColor = System.Drawing.Color.Maroon;
			this.lblDescription.Image = ((System.Drawing.Image)(resources.GetObject("lblDescription.Image")));
			this.lblDescription.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDescription.ImageAlign")));
			this.lblDescription.ImageIndex = ((int)(resources.GetObject("lblDescription.ImageIndex")));
			this.lblDescription.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDescription.ImeMode")));
			this.lblDescription.Location = ((System.Drawing.Point)(resources.GetObject("lblDescription.Location")));
			this.lblDescription.Name = "lblDescription";
			this.lblDescription.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDescription.RightToLeft")));
			this.lblDescription.Size = ((System.Drawing.Size)(resources.GetObject("lblDescription.Size")));
			this.lblDescription.TabIndex = ((int)(resources.GetObject("lblDescription.TabIndex")));
			this.lblDescription.Text = resources.GetString("lblDescription.Text");
			this.lblDescription.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDescription.TextAlign")));
			this.lblDescription.Visible = ((bool)(resources.GetObject("lblDescription.Visible")));
			// 
			// lblRevision
			// 
			this.lblRevision.AccessibleDescription = resources.GetString("lblRevision.AccessibleDescription");
			this.lblRevision.AccessibleName = resources.GetString("lblRevision.AccessibleName");
			this.lblRevision.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblRevision.Anchor")));
			this.lblRevision.AutoSize = ((bool)(resources.GetObject("lblRevision.AutoSize")));
			this.lblRevision.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblRevision.Dock")));
			this.lblRevision.Enabled = ((bool)(resources.GetObject("lblRevision.Enabled")));
			this.lblRevision.Font = ((System.Drawing.Font)(resources.GetObject("lblRevision.Font")));
			this.lblRevision.ForeColor = System.Drawing.SystemColors.ControlText;
			this.lblRevision.Image = ((System.Drawing.Image)(resources.GetObject("lblRevision.Image")));
			this.lblRevision.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRevision.ImageAlign")));
			this.lblRevision.ImageIndex = ((int)(resources.GetObject("lblRevision.ImageIndex")));
			this.lblRevision.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblRevision.ImeMode")));
			this.lblRevision.Location = ((System.Drawing.Point)(resources.GetObject("lblRevision.Location")));
			this.lblRevision.Name = "lblRevision";
			this.lblRevision.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblRevision.RightToLeft")));
			this.lblRevision.Size = ((System.Drawing.Size)(resources.GetObject("lblRevision.Size")));
			this.lblRevision.TabIndex = ((int)(resources.GetObject("lblRevision.TabIndex")));
			this.lblRevision.Text = resources.GetString("lblRevision.Text");
			this.lblRevision.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRevision.TextAlign")));
			this.lblRevision.Visible = ((bool)(resources.GetObject("lblRevision.Visible")));
			// 
			// btnSearchProductCode
			// 
			this.btnSearchProductCode.AccessibleDescription = resources.GetString("btnSearchProductCode.AccessibleDescription");
			this.btnSearchProductCode.AccessibleName = resources.GetString("btnSearchProductCode.AccessibleName");
			this.btnSearchProductCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSearchProductCode.Anchor")));
			this.btnSearchProductCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearchProductCode.BackgroundImage")));
			this.btnSearchProductCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSearchProductCode.Dock")));
			this.btnSearchProductCode.Enabled = ((bool)(resources.GetObject("btnSearchProductCode.Enabled")));
			this.btnSearchProductCode.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSearchProductCode.FlatStyle")));
			this.btnSearchProductCode.Font = ((System.Drawing.Font)(resources.GetObject("btnSearchProductCode.Font")));
			this.btnSearchProductCode.Image = ((System.Drawing.Image)(resources.GetObject("btnSearchProductCode.Image")));
			this.btnSearchProductCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchProductCode.ImageAlign")));
			this.btnSearchProductCode.ImageIndex = ((int)(resources.GetObject("btnSearchProductCode.ImageIndex")));
			this.btnSearchProductCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSearchProductCode.ImeMode")));
			this.btnSearchProductCode.Location = ((System.Drawing.Point)(resources.GetObject("btnSearchProductCode.Location")));
			this.btnSearchProductCode.Name = "btnSearchProductCode";
			this.btnSearchProductCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSearchProductCode.RightToLeft")));
			this.btnSearchProductCode.Size = ((System.Drawing.Size)(resources.GetObject("btnSearchProductCode.Size")));
			this.btnSearchProductCode.TabIndex = ((int)(resources.GetObject("btnSearchProductCode.TabIndex")));
			this.btnSearchProductCode.Text = resources.GetString("btnSearchProductCode.Text");
			this.btnSearchProductCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchProductCode.TextAlign")));
			this.btnSearchProductCode.Visible = ((bool)(resources.GetObject("btnSearchProductCode.Visible")));
			this.btnSearchProductCode.Click += new System.EventHandler(this.btnSearchProductCode_Click);
			// 
			// lblCode
			// 
			this.lblCode.AccessibleDescription = resources.GetString("lblCode.AccessibleDescription");
			this.lblCode.AccessibleName = resources.GetString("lblCode.AccessibleName");
			this.lblCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCode.Anchor")));
			this.lblCode.AutoSize = ((bool)(resources.GetObject("lblCode.AutoSize")));
			this.lblCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCode.Dock")));
			this.lblCode.Enabled = ((bool)(resources.GetObject("lblCode.Enabled")));
			this.lblCode.Font = ((System.Drawing.Font)(resources.GetObject("lblCode.Font")));
			this.lblCode.ForeColor = System.Drawing.Color.Maroon;
			this.lblCode.Image = ((System.Drawing.Image)(resources.GetObject("lblCode.Image")));
			this.lblCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCode.ImageAlign")));
			this.lblCode.ImageIndex = ((int)(resources.GetObject("lblCode.ImageIndex")));
			this.lblCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCode.ImeMode")));
			this.lblCode.Location = ((System.Drawing.Point)(resources.GetObject("lblCode.Location")));
			this.lblCode.Name = "lblCode";
			this.lblCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCode.RightToLeft")));
			this.lblCode.Size = ((System.Drawing.Size)(resources.GetObject("lblCode.Size")));
			this.lblCode.TabIndex = ((int)(resources.GetObject("lblCode.TabIndex")));
			this.lblCode.Text = resources.GetString("lblCode.Text");
			this.lblCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCode.TextAlign")));
			this.lblCode.Visible = ((bool)(resources.GetObject("lblCode.Visible")));
			// 
			// txtQuantity
			// 
			this.txtQuantity.AcceptsEscape = ((bool)(resources.GetObject("txtQuantity.AcceptsEscape")));
			this.txtQuantity.AccessibleDescription = resources.GetString("txtQuantity.AccessibleDescription");
			this.txtQuantity.AccessibleName = resources.GetString("txtQuantity.AccessibleName");
			this.txtQuantity.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtQuantity.Anchor")));
			this.txtQuantity.AutoSize = ((bool)(resources.GetObject("txtQuantity.AutoSize")));
			this.txtQuantity.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtQuantity.BackgroundImage")));
			this.txtQuantity.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("txtQuantity.BorderStyle")));
			// 
			// txtQuantity.Calculator
			// 
			this.txtQuantity.Calculator.AccessibleDescription = resources.GetString("txtQuantity.Calculator.AccessibleDescription");
			this.txtQuantity.Calculator.AccessibleName = resources.GetString("txtQuantity.Calculator.AccessibleName");
			this.txtQuantity.Calculator.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtQuantity.Calculator.BackgroundImage")));
			this.txtQuantity.Calculator.ButtonFlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("txtQuantity.Calculator.ButtonFlatStyle")));
			this.txtQuantity.Calculator.DisplayFormat = resources.GetString("txtQuantity.Calculator.DisplayFormat");
			this.txtQuantity.Calculator.Font = ((System.Drawing.Font)(resources.GetObject("txtQuantity.Calculator.Font")));
			this.txtQuantity.Calculator.FormatOnClose = ((bool)(resources.GetObject("txtQuantity.Calculator.FormatOnClose")));
			this.txtQuantity.Calculator.StoredFormat = resources.GetString("txtQuantity.Calculator.StoredFormat");
			this.txtQuantity.Calculator.UIStrings.Content = ((string[])(resources.GetObject("txtQuantity.Calculator.UIStrings.Content")));
			this.txtQuantity.CaseSensitive = ((bool)(resources.GetObject("txtQuantity.CaseSensitive")));
			this.txtQuantity.Culture = ((int)(resources.GetObject("txtQuantity.Culture")));
			this.txtQuantity.CustomFormat = resources.GetString("txtQuantity.CustomFormat");
			this.txtQuantity.DataType = ((System.Type)(resources.GetObject("txtQuantity.DataType")));
			this.txtQuantity.DisplayFormat.CustomFormat = resources.GetString("txtQuantity.DisplayFormat.CustomFormat");
			this.txtQuantity.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtQuantity.DisplayFormat.FormatType")));
			this.txtQuantity.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtQuantity.DisplayFormat.Inherit")));
			this.txtQuantity.DisplayFormat.NullText = resources.GetString("txtQuantity.DisplayFormat.NullText");
			this.txtQuantity.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("txtQuantity.DisplayFormat.TrimEnd")));
			this.txtQuantity.DisplayFormat.TrimStart = ((bool)(resources.GetObject("txtQuantity.DisplayFormat.TrimStart")));
			this.txtQuantity.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtQuantity.Dock")));
			this.txtQuantity.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("txtQuantity.DropDownFormAlign")));
			this.txtQuantity.EditFormat.CustomFormat = resources.GetString("txtQuantity.EditFormat.CustomFormat");
			this.txtQuantity.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtQuantity.EditFormat.FormatType")));
			this.txtQuantity.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtQuantity.EditFormat.Inherit")));
			this.txtQuantity.EditFormat.NullText = resources.GetString("txtQuantity.EditFormat.NullText");
			this.txtQuantity.EditFormat.TrimEnd = ((bool)(resources.GetObject("txtQuantity.EditFormat.TrimEnd")));
			this.txtQuantity.EditFormat.TrimStart = ((bool)(resources.GetObject("txtQuantity.EditFormat.TrimStart")));
			this.txtQuantity.EditMask = resources.GetString("txtQuantity.EditMask");
			this.txtQuantity.EmptyAsNull = ((bool)(resources.GetObject("txtQuantity.EmptyAsNull")));
			this.txtQuantity.Enabled = ((bool)(resources.GetObject("txtQuantity.Enabled")));
			this.txtQuantity.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("txtQuantity.ErrorInfo.BeepOnError")));
			this.txtQuantity.ErrorInfo.ErrorMessage = resources.GetString("txtQuantity.ErrorInfo.ErrorMessage");
			this.txtQuantity.ErrorInfo.ErrorMessageCaption = resources.GetString("txtQuantity.ErrorInfo.ErrorMessageCaption");
			this.txtQuantity.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("txtQuantity.ErrorInfo.ShowErrorMessage")));
			this.txtQuantity.ErrorInfo.ValueOnError = ((object)(resources.GetObject("txtQuantity.ErrorInfo.ValueOnError")));
			this.txtQuantity.Font = ((System.Drawing.Font)(resources.GetObject("txtQuantity.Font")));
			this.txtQuantity.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtQuantity.FormatType")));
			this.txtQuantity.GapHeight = ((int)(resources.GetObject("txtQuantity.GapHeight")));
			this.txtQuantity.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtQuantity.ImeMode")));
			this.txtQuantity.Increment = ((object)(resources.GetObject("txtQuantity.Increment")));
			this.txtQuantity.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("txtQuantity.InitialSelection")));
			this.txtQuantity.Location = ((System.Drawing.Point)(resources.GetObject("txtQuantity.Location")));
			this.txtQuantity.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("txtQuantity.MaskInfo.AutoTabWhenFilled")));
			this.txtQuantity.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("txtQuantity.MaskInfo.CaseSensitive")));
			this.txtQuantity.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("txtQuantity.MaskInfo.CopyWithLiterals")));
			this.txtQuantity.MaskInfo.EditMask = resources.GetString("txtQuantity.MaskInfo.EditMask");
			this.txtQuantity.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("txtQuantity.MaskInfo.EmptyAsNull")));
			this.txtQuantity.MaskInfo.ErrorMessage = resources.GetString("txtQuantity.MaskInfo.ErrorMessage");
			this.txtQuantity.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("txtQuantity.MaskInfo.Inherit")));
			this.txtQuantity.MaskInfo.PromptChar = ((char)(resources.GetObject("txtQuantity.MaskInfo.PromptChar")));
			this.txtQuantity.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("txtQuantity.MaskInfo.ShowLiterals")));
			this.txtQuantity.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("txtQuantity.MaskInfo.StoredEmptyChar")));
			this.txtQuantity.MaxLength = ((int)(resources.GetObject("txtQuantity.MaxLength")));
			this.txtQuantity.Name = "txtQuantity";
			this.txtQuantity.NullText = resources.GetString("txtQuantity.NullText");
			this.txtQuantity.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("txtQuantity.ParseInfo.CaseSensitive")));
			this.txtQuantity.ParseInfo.CustomFormat = resources.GetString("txtQuantity.ParseInfo.CustomFormat");
			this.txtQuantity.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("txtQuantity.ParseInfo.EmptyAsNull")));
			this.txtQuantity.ParseInfo.ErrorMessage = resources.GetString("txtQuantity.ParseInfo.ErrorMessage");
			this.txtQuantity.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtQuantity.ParseInfo.FormatType")));
			this.txtQuantity.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("txtQuantity.ParseInfo.Inherit")));
			this.txtQuantity.ParseInfo.NullText = resources.GetString("txtQuantity.ParseInfo.NullText");
			this.txtQuantity.ParseInfo.NumberStyle = ((C1.Win.C1Input.NumberStyleFlags)(resources.GetObject("txtQuantity.ParseInfo.NumberStyle")));
			this.txtQuantity.ParseInfo.TrimEnd = ((bool)(resources.GetObject("txtQuantity.ParseInfo.TrimEnd")));
			this.txtQuantity.ParseInfo.TrimStart = ((bool)(resources.GetObject("txtQuantity.ParseInfo.TrimStart")));
			this.txtQuantity.PasswordChar = ((char)(resources.GetObject("txtQuantity.PasswordChar")));
			this.txtQuantity.PostValidation.CaseSensitive = ((bool)(resources.GetObject("txtQuantity.PostValidation.CaseSensitive")));
			this.txtQuantity.PostValidation.ErrorMessage = resources.GetString("txtQuantity.PostValidation.ErrorMessage");
			this.txtQuantity.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("txtQuantity.PostValidation.Inherit")));
			this.txtQuantity.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("txtQuantity.PostValidation.Validation")));
			this.txtQuantity.PostValidation.Values = ((System.Array)(resources.GetObject("txtQuantity.PostValidation.Values")));
			this.txtQuantity.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("txtQuantity.PostValidation.ValuesExcluded")));
			this.txtQuantity.PreValidation.CaseSensitive = ((bool)(resources.GetObject("txtQuantity.PreValidation.CaseSensitive")));
			this.txtQuantity.PreValidation.ErrorMessage = resources.GetString("txtQuantity.PreValidation.ErrorMessage");
			this.txtQuantity.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("txtQuantity.PreValidation.Inherit")));
			this.txtQuantity.PreValidation.ItemSeparator = resources.GetString("txtQuantity.PreValidation.ItemSeparator");
			this.txtQuantity.PreValidation.PatternString = resources.GetString("txtQuantity.PreValidation.PatternString");
			this.txtQuantity.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("txtQuantity.PreValidation.RegexOptions")));
			this.txtQuantity.PreValidation.TrimEnd = ((bool)(resources.GetObject("txtQuantity.PreValidation.TrimEnd")));
			this.txtQuantity.PreValidation.TrimStart = ((bool)(resources.GetObject("txtQuantity.PreValidation.TrimStart")));
			this.txtQuantity.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("txtQuantity.PreValidation.Validation")));
			this.txtQuantity.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtQuantity.RightToLeft")));
			this.txtQuantity.ShowFocusRectangle = ((bool)(resources.GetObject("txtQuantity.ShowFocusRectangle")));
			this.txtQuantity.Size = ((System.Drawing.Size)(resources.GetObject("txtQuantity.Size")));
			this.txtQuantity.TabIndex = ((int)(resources.GetObject("txtQuantity.TabIndex")));
			this.txtQuantity.Tag = ((object)(resources.GetObject("txtQuantity.Tag")));
			this.txtQuantity.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtQuantity.TextAlign")));
			this.txtQuantity.TrimEnd = ((bool)(resources.GetObject("txtQuantity.TrimEnd")));
			this.txtQuantity.TrimStart = ((bool)(resources.GetObject("txtQuantity.TrimStart")));
			this.txtQuantity.UserCultureOverride = ((bool)(resources.GetObject("txtQuantity.UserCultureOverride")));
			this.txtQuantity.Value = ((object)(resources.GetObject("txtQuantity.Value")));
			this.txtQuantity.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("txtQuantity.VerticalAlign")));
			this.txtQuantity.Visible = ((bool)(resources.GetObject("txtQuantity.Visible")));
			this.txtQuantity.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("txtQuantity.VisibleButtons")));
			this.txtQuantity.Validating += new System.ComponentModel.CancelEventHandler(this.txtQuantity_Validating);
			// 
			// label10
			// 
			this.label10.AccessibleDescription = resources.GetString("label10.AccessibleDescription");
			this.label10.AccessibleName = resources.GetString("label10.AccessibleName");
			this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label10.Anchor")));
			this.label10.AutoSize = ((bool)(resources.GetObject("label10.AutoSize")));
			this.label10.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label10.Dock")));
			this.label10.Enabled = ((bool)(resources.GetObject("label10.Enabled")));
			this.label10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label10.Font = ((System.Drawing.Font)(resources.GetObject("label10.Font")));
			this.label10.ForeColor = System.Drawing.Color.Maroon;
			this.label10.Image = ((System.Drawing.Image)(resources.GetObject("label10.Image")));
			this.label10.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label10.ImageAlign")));
			this.label10.ImageIndex = ((int)(resources.GetObject("label10.ImageIndex")));
			this.label10.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label10.ImeMode")));
			this.label10.Location = ((System.Drawing.Point)(resources.GetObject("label10.Location")));
			this.label10.Name = "label10";
			this.label10.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label10.RightToLeft")));
			this.label10.Size = ((System.Drawing.Size)(resources.GetObject("label10.Size")));
			this.label10.TabIndex = ((int)(resources.GetObject("label10.TabIndex")));
			this.label10.Text = resources.GetString("label10.Text");
			this.label10.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label10.TextAlign")));
			this.label10.Visible = ((bool)(resources.GetObject("label10.Visible")));
			// 
			// btnHelp
			// 
			this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
			this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
			this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
			this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
			this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
			this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
			this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
			this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
			this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
			this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
			this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
			this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
			this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
			this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
			this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
			this.btnHelp.Text = resources.GetString("btnHelp.Text");
			this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
			this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// dtmPostDate
			// 
			this.dtmPostDate.AcceptsEscape = ((bool)(resources.GetObject("dtmPostDate.AcceptsEscape")));
			this.dtmPostDate.AccessibleDescription = resources.GetString("dtmPostDate.AccessibleDescription");
			this.dtmPostDate.AccessibleName = resources.GetString("dtmPostDate.AccessibleName");
			this.dtmPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmPostDate.Anchor")));
			this.dtmPostDate.AutoSize = ((bool)(resources.GetObject("dtmPostDate.AutoSize")));
			this.dtmPostDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.BackgroundImage")));
			this.dtmPostDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmPostDate.BorderStyle")));
			// 
			// dtmPostDate.Calendar
			// 
			this.dtmPostDate.Calendar.AccessibleDescription = resources.GetString("dtmPostDate.Calendar.AccessibleDescription");
			this.dtmPostDate.Calendar.AccessibleName = resources.GetString("dtmPostDate.Calendar.AccessibleName");
			this.dtmPostDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.AnnuallyBoldedDates")));
			this.dtmPostDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.Calendar.BackgroundImage")));
			this.dtmPostDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.BoldedDates")));
			this.dtmPostDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Calendar.CalendarDimensions")));
			this.dtmPostDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmPostDate.Calendar.Enabled")));
			this.dtmPostDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmPostDate.Calendar.FirstDayOfWeek")));
			this.dtmPostDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Calendar.Font")));
			this.dtmPostDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.Calendar.ImeMode")));
			this.dtmPostDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.MonthlyBoldedDates")));
			this.dtmPostDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.Calendar.RightToLeft")));
			this.dtmPostDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowClearButton")));
			this.dtmPostDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowTodayButton")));
			this.dtmPostDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowWeekNumbers")));
			this.dtmPostDate.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.CaseSensitive")));
			this.dtmPostDate.Culture = ((int)(resources.GetObject("dtmPostDate.Culture")));
			this.dtmPostDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmPostDate.CurrentTimeZone")));
			this.dtmPostDate.CustomFormat = resources.GetString("dtmPostDate.CustomFormat");
			this.dtmPostDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmPostDate.DaylightTimeAdjustment")));
			this.dtmPostDate.DisplayFormat.CustomFormat = resources.GetString("dtmPostDate.DisplayFormat.CustomFormat");
			this.dtmPostDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.DisplayFormat.FormatType")));
			this.dtmPostDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.DisplayFormat.Inherit")));
			this.dtmPostDate.DisplayFormat.NullText = resources.GetString("dtmPostDate.DisplayFormat.NullText");
			this.dtmPostDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimEnd")));
			this.dtmPostDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimStart")));
			this.dtmPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmPostDate.Dock")));
			this.dtmPostDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmPostDate.DropDownFormAlign")));
			this.dtmPostDate.EditFormat.CustomFormat = resources.GetString("dtmPostDate.EditFormat.CustomFormat");
			this.dtmPostDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.EditFormat.FormatType")));
			this.dtmPostDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.EditFormat.Inherit")));
			this.dtmPostDate.EditFormat.NullText = resources.GetString("dtmPostDate.EditFormat.NullText");
			this.dtmPostDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimEnd")));
			this.dtmPostDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimStart")));
			this.dtmPostDate.EditMask = resources.GetString("dtmPostDate.EditMask");
			this.dtmPostDate.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.EmptyAsNull")));
			this.dtmPostDate.Enabled = ((bool)(resources.GetObject("dtmPostDate.Enabled")));
			this.dtmPostDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.BeepOnError")));
			this.dtmPostDate.ErrorInfo.ErrorMessage = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessage");
			this.dtmPostDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessageCaption");
			this.dtmPostDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.ShowErrorMessage")));
			this.dtmPostDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmPostDate.ErrorInfo.ValueOnError")));
			this.dtmPostDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Font")));
			this.dtmPostDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.FormatType")));
			this.dtmPostDate.GapHeight = ((int)(resources.GetObject("dtmPostDate.GapHeight")));
			this.dtmPostDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmPostDate.GMTOffset")));
			this.dtmPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.ImeMode")));
			this.dtmPostDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmPostDate.InitialSelection")));
			this.dtmPostDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmPostDate.Location")));
			this.dtmPostDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmPostDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CaseSensitive")));
			this.dtmPostDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CopyWithLiterals")));
			this.dtmPostDate.MaskInfo.EditMask = resources.GetString("dtmPostDate.MaskInfo.EditMask");
			this.dtmPostDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.EmptyAsNull")));
			this.dtmPostDate.MaskInfo.ErrorMessage = resources.GetString("dtmPostDate.MaskInfo.ErrorMessage");
			this.dtmPostDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmPostDate.MaskInfo.Inherit")));
			this.dtmPostDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.PromptChar")));
			this.dtmPostDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmPostDate.MaskInfo.ShowLiterals")));
			this.dtmPostDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.StoredEmptyChar")));
			this.dtmPostDate.MaxLength = ((int)(resources.GetObject("dtmPostDate.MaxLength")));
			this.dtmPostDate.Name = "dtmPostDate";
			this.dtmPostDate.NullText = resources.GetString("dtmPostDate.NullText");
			this.dtmPostDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.CaseSensitive")));
			this.dtmPostDate.ParseInfo.CustomFormat = resources.GetString("dtmPostDate.ParseInfo.CustomFormat");
			this.dtmPostDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmPostDate.ParseInfo.DateTimeStyle")));
			this.dtmPostDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.EmptyAsNull")));
			this.dtmPostDate.ParseInfo.ErrorMessage = resources.GetString("dtmPostDate.ParseInfo.ErrorMessage");
			this.dtmPostDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.ParseInfo.FormatType")));
			this.dtmPostDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmPostDate.ParseInfo.Inherit")));
			this.dtmPostDate.ParseInfo.NullText = resources.GetString("dtmPostDate.ParseInfo.NullText");
			this.dtmPostDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimEnd")));
			this.dtmPostDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimStart")));
			this.dtmPostDate.PasswordChar = ((char)(resources.GetObject("dtmPostDate.PasswordChar")));
			this.dtmPostDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PostValidation.CaseSensitive")));
			this.dtmPostDate.PostValidation.ErrorMessage = resources.GetString("dtmPostDate.PostValidation.ErrorMessage");
			this.dtmPostDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmPostDate.PostValidation.Inherit")));
			this.dtmPostDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmPostDate.PostValidation.Validation")));
			this.dtmPostDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.Values")));
			this.dtmPostDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.ValuesExcluded")));
			this.dtmPostDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PreValidation.CaseSensitive")));
			this.dtmPostDate.PreValidation.ErrorMessage = resources.GetString("dtmPostDate.PreValidation.ErrorMessage");
			this.dtmPostDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmPostDate.PreValidation.Inherit")));
			this.dtmPostDate.PreValidation.ItemSeparator = resources.GetString("dtmPostDate.PreValidation.ItemSeparator");
			this.dtmPostDate.PreValidation.PatternString = resources.GetString("dtmPostDate.PreValidation.PatternString");
			this.dtmPostDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmPostDate.PreValidation.RegexOptions")));
			this.dtmPostDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimEnd")));
			this.dtmPostDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimStart")));
			this.dtmPostDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmPostDate.PreValidation.Validation")));
			this.dtmPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.RightToLeft")));
			this.dtmPostDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmPostDate.ShowFocusRectangle")));
			this.dtmPostDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Size")));
			this.dtmPostDate.TabIndex = ((int)(resources.GetObject("dtmPostDate.TabIndex")));
			this.dtmPostDate.Tag = ((object)(resources.GetObject("dtmPostDate.Tag")));
			this.dtmPostDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmPostDate.TextAlign")));
			this.dtmPostDate.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.TrimEnd")));
			this.dtmPostDate.TrimStart = ((bool)(resources.GetObject("dtmPostDate.TrimStart")));
			this.dtmPostDate.UserCultureOverride = ((bool)(resources.GetObject("dtmPostDate.UserCultureOverride")));
			this.dtmPostDate.Value = ((object)(resources.GetObject("dtmPostDate.Value")));
			this.dtmPostDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmPostDate.VerticalAlign")));
			this.dtmPostDate.Visible = ((bool)(resources.GetObject("dtmPostDate.Visible")));
			this.dtmPostDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmPostDate.VisibleButtons")));
			this.dtmPostDate.Leave += new System.EventHandler(this.dtmPostDate_Leave);
			// 
			// txtOrderNo
			// 
			this.txtOrderNo.AccessibleDescription = resources.GetString("txtOrderNo.AccessibleDescription");
			this.txtOrderNo.AccessibleName = resources.GetString("txtOrderNo.AccessibleName");
			this.txtOrderNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtOrderNo.Anchor")));
			this.txtOrderNo.AutoSize = ((bool)(resources.GetObject("txtOrderNo.AutoSize")));
			this.txtOrderNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtOrderNo.BackgroundImage")));
			this.txtOrderNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtOrderNo.Dock")));
			this.txtOrderNo.Enabled = ((bool)(resources.GetObject("txtOrderNo.Enabled")));
			this.txtOrderNo.Font = ((System.Drawing.Font)(resources.GetObject("txtOrderNo.Font")));
			this.txtOrderNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtOrderNo.ImeMode")));
			this.txtOrderNo.Location = ((System.Drawing.Point)(resources.GetObject("txtOrderNo.Location")));
			this.txtOrderNo.MaxLength = ((int)(resources.GetObject("txtOrderNo.MaxLength")));
			this.txtOrderNo.Multiline = ((bool)(resources.GetObject("txtOrderNo.Multiline")));
			this.txtOrderNo.Name = "txtOrderNo";
			this.txtOrderNo.PasswordChar = ((char)(resources.GetObject("txtOrderNo.PasswordChar")));
			this.txtOrderNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtOrderNo.RightToLeft")));
			this.txtOrderNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtOrderNo.ScrollBars")));
			this.txtOrderNo.Size = ((System.Drawing.Size)(resources.GetObject("txtOrderNo.Size")));
			this.txtOrderNo.TabIndex = ((int)(resources.GetObject("txtOrderNo.TabIndex")));
			this.txtOrderNo.Text = resources.GetString("txtOrderNo.Text");
			this.txtOrderNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtOrderNo.TextAlign")));
			this.txtOrderNo.Visible = ((bool)(resources.GetObject("txtOrderNo.Visible")));
			this.txtOrderNo.WordWrap = ((bool)(resources.GetObject("txtOrderNo.WordWrap")));
			this.txtOrderNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtOrderNo_KeyDown);
			this.txtOrderNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtOrderNo_Validating);
			// 
			// btnOrderNo
			// 
			this.btnOrderNo.AccessibleDescription = resources.GetString("btnOrderNo.AccessibleDescription");
			this.btnOrderNo.AccessibleName = resources.GetString("btnOrderNo.AccessibleName");
			this.btnOrderNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnOrderNo.Anchor")));
			this.btnOrderNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnOrderNo.BackgroundImage")));
			this.btnOrderNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnOrderNo.Dock")));
			this.btnOrderNo.Enabled = ((bool)(resources.GetObject("btnOrderNo.Enabled")));
			this.btnOrderNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnOrderNo.FlatStyle")));
			this.btnOrderNo.Font = ((System.Drawing.Font)(resources.GetObject("btnOrderNo.Font")));
			this.btnOrderNo.Image = ((System.Drawing.Image)(resources.GetObject("btnOrderNo.Image")));
			this.btnOrderNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOrderNo.ImageAlign")));
			this.btnOrderNo.ImageIndex = ((int)(resources.GetObject("btnOrderNo.ImageIndex")));
			this.btnOrderNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnOrderNo.ImeMode")));
			this.btnOrderNo.Location = ((System.Drawing.Point)(resources.GetObject("btnOrderNo.Location")));
			this.btnOrderNo.Name = "btnOrderNo";
			this.btnOrderNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnOrderNo.RightToLeft")));
			this.btnOrderNo.Size = ((System.Drawing.Size)(resources.GetObject("btnOrderNo.Size")));
			this.btnOrderNo.TabIndex = ((int)(resources.GetObject("btnOrderNo.TabIndex")));
			this.btnOrderNo.Text = resources.GetString("btnOrderNo.Text");
			this.btnOrderNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOrderNo.TextAlign")));
			this.btnOrderNo.Visible = ((bool)(resources.GetObject("btnOrderNo.Visible")));
			this.btnOrderNo.Click += new System.EventHandler(this.btnOrderNo_Click);
			// 
			// lblCCN
			// 
			this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
			this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
			this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
			this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
			this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
			this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
			this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
			this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
			this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
			this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
			this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
			this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
			this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
			this.lblCCN.Name = "lblCCN";
			this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
			this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
			this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
			this.lblCCN.Text = resources.GetString("lblCCN.Text");
			this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
			this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
			// 
			// lblOrderNo
			// 
			this.lblOrderNo.AccessibleDescription = resources.GetString("lblOrderNo.AccessibleDescription");
			this.lblOrderNo.AccessibleName = resources.GetString("lblOrderNo.AccessibleName");
			this.lblOrderNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblOrderNo.Anchor")));
			this.lblOrderNo.AutoSize = ((bool)(resources.GetObject("lblOrderNo.AutoSize")));
			this.lblOrderNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblOrderNo.Dock")));
			this.lblOrderNo.Enabled = ((bool)(resources.GetObject("lblOrderNo.Enabled")));
			this.lblOrderNo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.lblOrderNo.Font = ((System.Drawing.Font)(resources.GetObject("lblOrderNo.Font")));
			this.lblOrderNo.ForeColor = System.Drawing.Color.Maroon;
			this.lblOrderNo.Image = ((System.Drawing.Image)(resources.GetObject("lblOrderNo.Image")));
			this.lblOrderNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblOrderNo.ImageAlign")));
			this.lblOrderNo.ImageIndex = ((int)(resources.GetObject("lblOrderNo.ImageIndex")));
			this.lblOrderNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblOrderNo.ImeMode")));
			this.lblOrderNo.Location = ((System.Drawing.Point)(resources.GetObject("lblOrderNo.Location")));
			this.lblOrderNo.Name = "lblOrderNo";
			this.lblOrderNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblOrderNo.RightToLeft")));
			this.lblOrderNo.Size = ((System.Drawing.Size)(resources.GetObject("lblOrderNo.Size")));
			this.lblOrderNo.TabIndex = ((int)(resources.GetObject("lblOrderNo.TabIndex")));
			this.lblOrderNo.Text = resources.GetString("lblOrderNo.Text");
			this.lblOrderNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblOrderNo.TextAlign")));
			this.lblOrderNo.Visible = ((bool)(resources.GetObject("lblOrderNo.Visible")));
			// 
			// lblTransDate
			// 
			this.lblTransDate.AccessibleDescription = resources.GetString("lblTransDate.AccessibleDescription");
			this.lblTransDate.AccessibleName = resources.GetString("lblTransDate.AccessibleName");
			this.lblTransDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblTransDate.Anchor")));
			this.lblTransDate.AutoSize = ((bool)(resources.GetObject("lblTransDate.AutoSize")));
			this.lblTransDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblTransDate.Dock")));
			this.lblTransDate.Enabled = ((bool)(resources.GetObject("lblTransDate.Enabled")));
			this.lblTransDate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.lblTransDate.Font = ((System.Drawing.Font)(resources.GetObject("lblTransDate.Font")));
			this.lblTransDate.ForeColor = System.Drawing.Color.Maroon;
			this.lblTransDate.Image = ((System.Drawing.Image)(resources.GetObject("lblTransDate.Image")));
			this.lblTransDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTransDate.ImageAlign")));
			this.lblTransDate.ImageIndex = ((int)(resources.GetObject("lblTransDate.ImageIndex")));
			this.lblTransDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblTransDate.ImeMode")));
			this.lblTransDate.Location = ((System.Drawing.Point)(resources.GetObject("lblTransDate.Location")));
			this.lblTransDate.Name = "lblTransDate";
			this.lblTransDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblTransDate.RightToLeft")));
			this.lblTransDate.Size = ((System.Drawing.Size)(resources.GetObject("lblTransDate.Size")));
			this.lblTransDate.TabIndex = ((int)(resources.GetObject("lblTransDate.TabIndex")));
			this.lblTransDate.Text = resources.GetString("lblTransDate.Text");
			this.lblTransDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTransDate.TextAlign")));
			this.lblTransDate.Visible = ((bool)(resources.GetObject("lblTransDate.Visible")));
			// 
			// cboCCN
			// 
			this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
			this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
			this.cboCCN.AddItemSeparator = ';';
			this.cboCCN.AllowRowSizing = C1.Win.C1List.RowSizingEnum.AllRows;
			this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
			this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
			this.cboCCN.Caption = "";
			this.cboCCN.CaptionHeight = 17;
			this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
			this.cboCCN.ColumnCaptionHeight = 17;
			this.cboCCN.ColumnFooterHeight = 17;
			this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
			this.cboCCN.ContentHeight = 15;
			this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
			this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
			this.cboCCN.DropDownWidth = 200;
			this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
			this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
			this.cboCCN.EditorHeight = 15;
			this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
			this.cboCCN.FlatStyle = C1.Win.C1List.FlatModeEnum.System;
			this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
			this.cboCCN.GapHeight = 2;
			this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
			this.cboCCN.ItemHeight = 15;
			this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
			this.cboCCN.MatchEntryTimeout = ((long)(2000));
			this.cboCCN.MaxDropDownItems = ((short)(5));
			this.cboCCN.MaxLength = 32767;
			this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
			this.cboCCN.Name = "cboCCN";
			this.cboCCN.PartialRightColumn = false;
			this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
			this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
			this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
			this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
			this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
			this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
			this.cboCCN.Text = resources.GetString("cboCCN.Text");
			this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
			this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
				"ta>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}Style2{" +
				"}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
				"lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
				"ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{BackColor:Wind" +
				"ow;}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style1{}OddRow{}Re" +
				"cordSelector{AlignImage:Center;}Heading{Wrap:True;BackColor:Control;Border:Raise" +
				"d,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}Style8{}Style10{}Style11{}" +
				"Style9{AlignHorz:Near;}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowC" +
				"olSelect=\"False\" Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFoote" +
				"rHeight=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0," +
				" 116, 156</ClientRect><VScrollBar><Width>16</Width></VScrollBar><HScrollBar><Hei" +
				"ght>16</Height></HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRow" +
				"Style parent=\"EvenRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" />" +
				"<GroupStyle parent=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Sty" +
				"le2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle par" +
				"ent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordS" +
				"electorStyle parent=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selec" +
				"ted\" me=\"Style5\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxV" +
				"iew></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" " +
				"me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=" +
				"\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"S" +
				"elected\" /><Style parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=" +
				"\"EvenRow\" /><Style parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"Rec" +
				"ordSelector\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1<" +
				"/vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWid" +
				"th>16</DefaultRecSelWidth></Blob>";
			// 
			// txtAvailable
			// 
			this.txtAvailable.AcceptsEscape = ((bool)(resources.GetObject("txtAvailable.AcceptsEscape")));
			this.txtAvailable.AccessibleDescription = resources.GetString("txtAvailable.AccessibleDescription");
			this.txtAvailable.AccessibleName = resources.GetString("txtAvailable.AccessibleName");
			this.txtAvailable.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtAvailable.Anchor")));
			this.txtAvailable.AutoSize = ((bool)(resources.GetObject("txtAvailable.AutoSize")));
			this.txtAvailable.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtAvailable.BackgroundImage")));
			this.txtAvailable.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("txtAvailable.BorderStyle")));
			// 
			// txtAvailable.Calculator
			// 
			this.txtAvailable.Calculator.AccessibleDescription = resources.GetString("txtAvailable.Calculator.AccessibleDescription");
			this.txtAvailable.Calculator.AccessibleName = resources.GetString("txtAvailable.Calculator.AccessibleName");
			this.txtAvailable.Calculator.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtAvailable.Calculator.BackgroundImage")));
			this.txtAvailable.Calculator.ButtonFlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("txtAvailable.Calculator.ButtonFlatStyle")));
			this.txtAvailable.Calculator.DisplayFormat = resources.GetString("txtAvailable.Calculator.DisplayFormat");
			this.txtAvailable.Calculator.Font = ((System.Drawing.Font)(resources.GetObject("txtAvailable.Calculator.Font")));
			this.txtAvailable.Calculator.FormatOnClose = ((bool)(resources.GetObject("txtAvailable.Calculator.FormatOnClose")));
			this.txtAvailable.Calculator.StoredFormat = resources.GetString("txtAvailable.Calculator.StoredFormat");
			this.txtAvailable.Calculator.UIStrings.Content = ((string[])(resources.GetObject("txtAvailable.Calculator.UIStrings.Content")));
			this.txtAvailable.CaseSensitive = ((bool)(resources.GetObject("txtAvailable.CaseSensitive")));
			this.txtAvailable.Culture = ((int)(resources.GetObject("txtAvailable.Culture")));
			this.txtAvailable.CustomFormat = resources.GetString("txtAvailable.CustomFormat");
			this.txtAvailable.DataType = ((System.Type)(resources.GetObject("txtAvailable.DataType")));
			this.txtAvailable.DisplayFormat.CustomFormat = resources.GetString("txtAvailable.DisplayFormat.CustomFormat");
			this.txtAvailable.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtAvailable.DisplayFormat.FormatType")));
			this.txtAvailable.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtAvailable.DisplayFormat.Inherit")));
			this.txtAvailable.DisplayFormat.NullText = resources.GetString("txtAvailable.DisplayFormat.NullText");
			this.txtAvailable.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("txtAvailable.DisplayFormat.TrimEnd")));
			this.txtAvailable.DisplayFormat.TrimStart = ((bool)(resources.GetObject("txtAvailable.DisplayFormat.TrimStart")));
			this.txtAvailable.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtAvailable.Dock")));
			this.txtAvailable.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("txtAvailable.DropDownFormAlign")));
			this.txtAvailable.EditFormat.CustomFormat = resources.GetString("txtAvailable.EditFormat.CustomFormat");
			this.txtAvailable.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtAvailable.EditFormat.FormatType")));
			this.txtAvailable.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtAvailable.EditFormat.Inherit")));
			this.txtAvailable.EditFormat.NullText = resources.GetString("txtAvailable.EditFormat.NullText");
			this.txtAvailable.EditFormat.TrimEnd = ((bool)(resources.GetObject("txtAvailable.EditFormat.TrimEnd")));
			this.txtAvailable.EditFormat.TrimStart = ((bool)(resources.GetObject("txtAvailable.EditFormat.TrimStart")));
			this.txtAvailable.EditMask = resources.GetString("txtAvailable.EditMask");
			this.txtAvailable.EmptyAsNull = ((bool)(resources.GetObject("txtAvailable.EmptyAsNull")));
			this.txtAvailable.Enabled = ((bool)(resources.GetObject("txtAvailable.Enabled")));
			this.txtAvailable.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("txtAvailable.ErrorInfo.BeepOnError")));
			this.txtAvailable.ErrorInfo.ErrorMessage = resources.GetString("txtAvailable.ErrorInfo.ErrorMessage");
			this.txtAvailable.ErrorInfo.ErrorMessageCaption = resources.GetString("txtAvailable.ErrorInfo.ErrorMessageCaption");
			this.txtAvailable.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("txtAvailable.ErrorInfo.ShowErrorMessage")));
			this.txtAvailable.ErrorInfo.ValueOnError = ((object)(resources.GetObject("txtAvailable.ErrorInfo.ValueOnError")));
			this.txtAvailable.Font = ((System.Drawing.Font)(resources.GetObject("txtAvailable.Font")));
			this.txtAvailable.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtAvailable.FormatType")));
			this.txtAvailable.GapHeight = ((int)(resources.GetObject("txtAvailable.GapHeight")));
			this.txtAvailable.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtAvailable.ImeMode")));
			this.txtAvailable.Increment = ((object)(resources.GetObject("txtAvailable.Increment")));
			this.txtAvailable.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("txtAvailable.InitialSelection")));
			this.txtAvailable.Location = ((System.Drawing.Point)(resources.GetObject("txtAvailable.Location")));
			this.txtAvailable.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("txtAvailable.MaskInfo.AutoTabWhenFilled")));
			this.txtAvailable.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("txtAvailable.MaskInfo.CaseSensitive")));
			this.txtAvailable.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("txtAvailable.MaskInfo.CopyWithLiterals")));
			this.txtAvailable.MaskInfo.EditMask = resources.GetString("txtAvailable.MaskInfo.EditMask");
			this.txtAvailable.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("txtAvailable.MaskInfo.EmptyAsNull")));
			this.txtAvailable.MaskInfo.ErrorMessage = resources.GetString("txtAvailable.MaskInfo.ErrorMessage");
			this.txtAvailable.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("txtAvailable.MaskInfo.Inherit")));
			this.txtAvailable.MaskInfo.PromptChar = ((char)(resources.GetObject("txtAvailable.MaskInfo.PromptChar")));
			this.txtAvailable.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("txtAvailable.MaskInfo.ShowLiterals")));
			this.txtAvailable.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("txtAvailable.MaskInfo.StoredEmptyChar")));
			this.txtAvailable.MaxLength = ((int)(resources.GetObject("txtAvailable.MaxLength")));
			this.txtAvailable.Name = "txtAvailable";
			this.txtAvailable.NullText = resources.GetString("txtAvailable.NullText");
			this.txtAvailable.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("txtAvailable.ParseInfo.CaseSensitive")));
			this.txtAvailable.ParseInfo.CustomFormat = resources.GetString("txtAvailable.ParseInfo.CustomFormat");
			this.txtAvailable.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("txtAvailable.ParseInfo.EmptyAsNull")));
			this.txtAvailable.ParseInfo.ErrorMessage = resources.GetString("txtAvailable.ParseInfo.ErrorMessage");
			this.txtAvailable.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtAvailable.ParseInfo.FormatType")));
			this.txtAvailable.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("txtAvailable.ParseInfo.Inherit")));
			this.txtAvailable.ParseInfo.NullText = resources.GetString("txtAvailable.ParseInfo.NullText");
			this.txtAvailable.ParseInfo.NumberStyle = ((C1.Win.C1Input.NumberStyleFlags)(resources.GetObject("txtAvailable.ParseInfo.NumberStyle")));
			this.txtAvailable.ParseInfo.TrimEnd = ((bool)(resources.GetObject("txtAvailable.ParseInfo.TrimEnd")));
			this.txtAvailable.ParseInfo.TrimStart = ((bool)(resources.GetObject("txtAvailable.ParseInfo.TrimStart")));
			this.txtAvailable.PasswordChar = ((char)(resources.GetObject("txtAvailable.PasswordChar")));
			this.txtAvailable.PostValidation.CaseSensitive = ((bool)(resources.GetObject("txtAvailable.PostValidation.CaseSensitive")));
			this.txtAvailable.PostValidation.ErrorMessage = resources.GetString("txtAvailable.PostValidation.ErrorMessage");
			this.txtAvailable.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("txtAvailable.PostValidation.Inherit")));
			this.txtAvailable.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("txtAvailable.PostValidation.Validation")));
			this.txtAvailable.PostValidation.Values = ((System.Array)(resources.GetObject("txtAvailable.PostValidation.Values")));
			this.txtAvailable.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("txtAvailable.PostValidation.ValuesExcluded")));
			this.txtAvailable.PreValidation.CaseSensitive = ((bool)(resources.GetObject("txtAvailable.PreValidation.CaseSensitive")));
			this.txtAvailable.PreValidation.ErrorMessage = resources.GetString("txtAvailable.PreValidation.ErrorMessage");
			this.txtAvailable.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("txtAvailable.PreValidation.Inherit")));
			this.txtAvailable.PreValidation.ItemSeparator = resources.GetString("txtAvailable.PreValidation.ItemSeparator");
			this.txtAvailable.PreValidation.PatternString = resources.GetString("txtAvailable.PreValidation.PatternString");
			this.txtAvailable.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("txtAvailable.PreValidation.RegexOptions")));
			this.txtAvailable.PreValidation.TrimEnd = ((bool)(resources.GetObject("txtAvailable.PreValidation.TrimEnd")));
			this.txtAvailable.PreValidation.TrimStart = ((bool)(resources.GetObject("txtAvailable.PreValidation.TrimStart")));
			this.txtAvailable.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("txtAvailable.PreValidation.Validation")));
			this.txtAvailable.ReadOnly = true;
			this.txtAvailable.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtAvailable.RightToLeft")));
			this.txtAvailable.ShowFocusRectangle = ((bool)(resources.GetObject("txtAvailable.ShowFocusRectangle")));
			this.txtAvailable.Size = ((System.Drawing.Size)(resources.GetObject("txtAvailable.Size")));
			this.txtAvailable.TabIndex = ((int)(resources.GetObject("txtAvailable.TabIndex")));
			this.txtAvailable.Tag = ((object)(resources.GetObject("txtAvailable.Tag")));
			this.txtAvailable.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtAvailable.TextAlign")));
			this.txtAvailable.TrimEnd = ((bool)(resources.GetObject("txtAvailable.TrimEnd")));
			this.txtAvailable.TrimStart = ((bool)(resources.GetObject("txtAvailable.TrimStart")));
			this.txtAvailable.UserCultureOverride = ((bool)(resources.GetObject("txtAvailable.UserCultureOverride")));
			this.txtAvailable.Value = ((object)(resources.GetObject("txtAvailable.Value")));
			this.txtAvailable.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("txtAvailable.VerticalAlign")));
			this.txtAvailable.Visible = ((bool)(resources.GetObject("txtAvailable.Visible")));
			this.txtAvailable.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("txtAvailable.VisibleButtons")));
			// 
			// label3
			// 
			this.label3.AccessibleDescription = resources.GetString("label3.AccessibleDescription");
			this.label3.AccessibleName = resources.GetString("label3.AccessibleName");
			this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label3.Anchor")));
			this.label3.AutoSize = ((bool)(resources.GetObject("label3.AutoSize")));
			this.label3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label3.Dock")));
			this.label3.Enabled = ((bool)(resources.GetObject("label3.Enabled")));
			this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label3.Font = ((System.Drawing.Font)(resources.GetObject("label3.Font")));
			this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
			this.label3.Image = ((System.Drawing.Image)(resources.GetObject("label3.Image")));
			this.label3.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.ImageAlign")));
			this.label3.ImageIndex = ((int)(resources.GetObject("label3.ImageIndex")));
			this.label3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label3.ImeMode")));
			this.label3.Location = ((System.Drawing.Point)(resources.GetObject("label3.Location")));
			this.label3.Name = "label3";
			this.label3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label3.RightToLeft")));
			this.label3.Size = ((System.Drawing.Size)(resources.GetObject("label3.Size")));
			this.label3.TabIndex = ((int)(resources.GetObject("label3.TabIndex")));
			this.label3.Text = resources.GetString("label3.Text");
			this.label3.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.TextAlign")));
			this.label3.Visible = ((bool)(resources.GetObject("label3.Visible")));
			// 
			// rptSlip
			// 
			this.rptSlip.ReportName = "RecycledSlip";
			// 
			// RecoverableMaterial
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.txtAvailable);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.dtmPostDate);
			this.Controls.Add(this.txtOrderNo);
			this.Controls.Add(this.txtRevision);
			this.Controls.Add(this.txtDescription);
			this.Controls.Add(this.txtCode);
			this.Controls.Add(this.txtBin);
			this.Controls.Add(this.txtLocation);
			this.Controls.Add(this.dgrdData);
			this.Controls.Add(this.btnOrderNo);
			this.Controls.Add(this.lblCCN);
			this.Controls.Add(this.lblOrderNo);
			this.Controls.Add(this.lblTransDate);
			this.Controls.Add(this.cboCCN);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.txtQuantity);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.btnSearchProductDescription);
			this.Controls.Add(this.lblDescription);
			this.Controls.Add(this.lblRevision);
			this.Controls.Add(this.btnSearchProductCode);
			this.Controls.Add(this.lblCode);
			this.Controls.Add(this.btnBin);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.btnLocation);
			this.Controls.Add(this.lblLocation);
			this.Controls.Add(this.btnPrint);
			this.Controls.Add(this.btnSave);
			this.Controls.Add(this.btnAdd);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.KeyPreview = true;
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "RecoverableMaterial";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.Closing += new System.ComponentModel.CancelEventHandler(this.RecoverableMaterial_Closing);
			this.Load += new System.EventHandler(this.RecoverableMaterial_Load);
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.txtQuantity)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.txtAvailable)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.rptSlip)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// btnLocation_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Tuandm</author>
		/// <date>Monday, Feb 27 2006</date>
		private void btnLocation_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnLocation_Click()";
			try
			{
				DataRowView drwResult = null;
				Hashtable htbCondition = new Hashtable();
				drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtLocation.Text, htbCondition, true);
				if (drwResult != null)
				{
					if (txtLocation.Tag != null)
					{
						if (txtLocation.Tag.ToString() != drwResult[MST_LocationTable.LOCATIONID_FLD].ToString())
						{
							//Clear Bin
							txtBin.Text = string.Empty;
							txtBin.Tag = null;
						}
					}
					txtLocation.Text = drwResult[MST_LocationTable.CODE_FLD].ToString();
					lblLocation.Tag = drwResult[MST_LocationTable.MASTERLOCATIONID_FLD];
					txtLocation.Tag = int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString());
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// btnBin_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Tuandm</author>
		/// <date>Monday, Feb 27 2006</date>
		private void btnBin_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnBin_Click()";
			try
			{
				DataRowView drwResult = null;
				Hashtable htbCondition = new Hashtable();
				
				if (txtLocation.Tag != null)
				{
					htbCondition.Add(MST_BINTable.LOCATIONID_FLD, txtLocation.Tag.ToString());
					htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.LS);
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Warning);
					txtLocation.Focus();
					return;
				}
				drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtBin.Text, htbCondition, true);
				if (drwResult != null)
				{
					txtBin.Text = drwResult[MST_BINTable.CODE_FLD].ToString();
					txtBin.Tag = int.Parse(drwResult[MST_BINTable.BINID_FLD].ToString());
					if (txtCode.Tag != null)
					{
//						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));

						txtQuantity.Value = txtAvailable.Value = decAvailableQuantityBin;	
					}
					
				}
				else
				{
					txtBin.Focus();
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// Fill data to controls
		/// </summary>
		/// <param name="pdrwResult"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void FillDataFromDataRowViewToControls(DataRowView pdrwResult)
		{
			const string METHOD_NAME = THIS + ".FillDataFromDataRowViewToControls()";
			try
			{
				txtCode.Text = pdrwResult[ITM_ProductTable.CODE_FLD].ToString();
				txtDescription.Text = pdrwResult[ITM_ProductTable.DESCRIPTION_FLD].ToString();
				txtRevision.Text = pdrwResult[ITM_ProductTable.REVISION_FLD].ToString();
				txtCode.Tag = int.Parse(pdrwResult[ITM_ProductTable.PRODUCTID_FLD].ToString());
				if (txtBin.Text.Trim() != string.Empty)
				{
//					decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//						Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
					decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
						Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
					txtQuantity.Value = txtAvailable.Value = decAvailableQuantityBin;
				}
				else
				{
					if (txtLocation.Text.Trim() != string.Empty)
					{
//						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), 0, Convert.ToInt32(txtCode.Tag));
						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), 0, Convert.ToInt32(txtCode.Tag));
						txtQuantity.Value =	txtAvailable.Value = decAvailableQuantityBin;
					}
				}
				BindDataToGrid(0, boRecoverable.ListBomOfProduct(Convert.ToInt32(txtCode.Tag)));
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// btnSearchProductCode_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void btnSearchProductCode_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSearchProductCode_Click()";
			try 
			{
				DataRowView drwResult = null;
				Hashtable htbConditon = new Hashtable();
				if (cboCCN.SelectedValue != null)
				{
					htbConditon.Add(ITM_ProductTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
					cboCCN.Focus();
					return;
				}
				htbConditon.Add(ITM_ProductTable.MAKEITEM_FLD, 1);
				drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.CODE_FLD, txtCode.Text, htbConditon, true);
				if (drwResult != null)
				{
					FillDataFromDataRowViewToControls(drwResult);
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// btnSearchProductDescription_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <daet>Thursday, Mar 2 2006</daet>
		private void btnSearchProductDescription_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSearchProductDescription_Click()";
			try 
			{
				DataRowView drwResult = null;
				Hashtable htbConditon = new Hashtable();
				if (cboCCN.SelectedValue != null)
				{
					htbConditon.Add(ITM_ProductTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
					cboCCN.Focus();
					return;
				}
				htbConditon.Add(ITM_ProductTable.MAKEITEM_FLD, 1);
				drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.DESCRIPTION_FLD, txtDescription.Text, htbConditon, true);
				if (drwResult != null)
				{
					FillDataFromDataRowViewToControls(drwResult);
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void RecoverableMaterial_Load(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".RecoverableMaterial_Load()";
			try
			{
				Security objSecurity = new Security();
				this.Name = THIS;
				if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
				{
					this.Close();
					return;
				}

				//Load CCN and set default CCN
				UtilsBO boUtils = new UtilsBO();
				DataSet dstCCN = boUtils.ListCCN();
				cboCCN.DataSource = dstCCN.Tables[MST_CCNTable.TABLE_NAME];
				cboCCN.DisplayMember	= MST_CCNTable.CODE_FLD;
				cboCCN.ValueMember		= MST_CCNTable.CCNID_FLD;
				FormControlComponents.PutDataIntoC1ComboBox(cboCCN,dstCCN.Tables[MST_CCNTable.TABLE_NAME],MST_CCNTable.CODE_FLD,MST_CCNTable.CCNID_FLD,MST_CCNTable.TABLE_NAME);
				if (SystemProperty.CCNID != 0)
				{
					cboCCN.SelectedValue = SystemProperty.CCNID;
				}
				//HACK: added by Tuan TQ. Format post date
				dtmPostDate.FormatType = C1.Win.C1Input.FormatTypeEnum.CustomFormat;
				dtmPostDate.CustomFormat = Constants.DATETIME_FORMAT_HOUR;
				dtmCurrentDate = (new UtilsBO()).GetDBDate().AddDays(1);
				//Reset form and save grid's layout
				dtbGridLayout = FormControlComponents.StoreGridLayout(dgrdData);
				FormMode = EnumAction.Default;
				SwitchFormMode();
				BindDataToGrid(0, boRecoverable.ListByMasterID(0));
				ConfigGrid(true);

			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		/// <summary>
		/// Change the state of control when FormMode is changed
		/// </summary>
		private void SwitchFormMode()
		{
			switch (FormMode)
			{
				case EnumAction.Add:
					btnAdd.Enabled = false;
					btnSave.Enabled = true;
					btnOrderNo.Enabled = false;
					txtOrderNo.Enabled = true;
					dtmPostDate.Enabled = true;

					txtLocation.Enabled = true;
					btnLocation.Enabled = true;
					txtBin.Enabled = true;
					btnBin.Enabled = true;
					txtCode.Enabled = true;
					btnSearchProductCode.Enabled = true;
					txtDescription.Enabled = true;
					btnSearchProductDescription.Enabled = true;
					txtQuantity.Enabled = true;
					dgrdData.AllowDelete = true;
					dgrdData.AllowUpdate = true;
					dgrdData.AllowAddNew = true;

					dtmPostDate.Value = new UtilsBO().GetDBDate();
					txtOrderNo.Text = string.Empty;
					txtLocation.Text = string.Empty;
					txtBin.Text = string.Empty;
					txtQuantity.Value = DBNull.Value;
					txtAvailable.Value = DBNull.Value;
					txtCode.Text = string.Empty;
					txtDescription.Text = string.Empty;
					txtRevision.Text = string.Empty;
					break;
				case EnumAction.Edit:
					break;
				case EnumAction.Default:
					btnAdd.Enabled = true;
					btnSave.Enabled = false;
					btnOrderNo.Enabled = true;
					txtOrderNo.Enabled = true;
					dtmPostDate.Enabled = false;

					txtLocation.Enabled = false;
					btnLocation.Enabled = false;
					txtBin.Enabled = false;
					btnBin.Enabled = false;
					txtCode.Enabled = false;
					btnSearchProductCode.Enabled = false;
					txtDescription.Enabled = false;
					btnSearchProductDescription.Enabled = false;
					txtQuantity.Enabled = false;
					dgrdData.AllowDelete = false;
					dgrdData.AllowUpdate = false;
					dgrdData.AllowAddNew = false;
					break;
			}
		}
		/// <summary>
		/// FillDataToAllControls
		/// </summary>
		/// <param name="pintRecoverableMasterID"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 3 2006</date>
		private void FillDataToAllControls(int pintRecoverableMasterID)
		{
			const string METHOD_NAME = THIS + ".FillDataToAllControls()";
			try
			{
				//Get information for master
				DataSet dstMaster = new	DataSet();
				dstMaster = boRecoverable.GetMasterByID(pintRecoverableMasterID);
				if (dstMaster.Tables[0].Rows.Count != 0)
				{
					dtmPostDate.Value = (DateTime)dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.POSTDATE_FLD]; 
					txtOrderNo.Text = dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.TRANSNO_FLD].ToString();
					txtLocation.Text = dstMaster.Tables[0].Rows[0][MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString();
					txtBin.Text = dstMaster.Tables[0].Rows[0][MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();
					txtCode.Text = dstMaster.Tables[0].Rows[0][ITM_ProductTable.CODE_FLD].ToString();
					txtCode.Tag = dstMaster.Tables[0].Rows[0][ITM_ProductTable.PRODUCTID_FLD];
					txtLocation.Tag = dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.FROMLOCATIONID_FLD];
					txtBin.Tag = dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.FROMBINID_FLD];
					txtDescription.Text = dstMaster.Tables[0].Rows[0][ITM_ProductTable.DESCRIPTION_FLD].ToString();
					txtRevision.Text = dstMaster.Tables[0].Rows[0][ITM_ProductTable.REVISION_FLD].ToString();
					txtQuantity.Value = (Decimal) dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.QUANTITY_FLD];
//					decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//						SystemProperty.MasterLocationID, Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
					if ((dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.AVAILABLEQTY_FLD] != DBNull.Value)
						&& (dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.AVAILABLEQTY_FLD].ToString() != string.Empty))
					txtAvailable.Value = (Decimal) dstMaster.Tables[0].Rows[0][CST_RecoverMaterialMasterTable.AVAILABLEQTY_FLD];
				}
				//Get information detail
				dstData = boRecoverable.ListByMasterID(pintRecoverableMasterID);
				//Update Line colum
				for (int i = 0; i < dstData.Tables[0].Rows.Count; i++)
				{
					dstData.Tables[0].Rows[i][PRO_WorkOrderDetailTable.LINE_FLD] = i + 1; 
				}
				dgrdData.DataSource = dstData.Tables[0];
				FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
				ConfigGrid(true);
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// btnOrderNo_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 3 2006</date>
		private void btnOrderNo_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnOrderNo_Click()";
			try
			{
				Hashtable htbCriterial = new Hashtable();
				DataRowView drwResult = null;
				if (cboCCN.SelectedValue != null)
				{
					htbCriterial.Add(CST_RecoverMaterialMasterTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
					cboCCN.Focus();
					return;
				}
				drwResult = FormControlComponents.OpenSearchForm(VIEW_RECOVERABLEMATERIALMASTER, CST_RecoverMaterialMasterTable.TRANSNO_FLD, txtOrderNo.Text.Trim(), htbCriterial, true);
				if (drwResult != null)
				{
					txtOrderNo.Text = drwResult[CST_RecoverMaterialMasterTable.TRANSNO_FLD].ToString().Trim();
					txtOrderNo.Tag = drwResult[CST_RecoverMaterialMasterTable.RECOVERMATERIALMASTERID_FLD].ToString().Trim();
					intRecoverableMasterID = Convert.ToInt32(txtOrderNo.Tag);
					FillDataToAllControls(int.Parse(txtOrderNo.Tag.ToString()));
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// Clear all controls in form
		/// </summary>
		/// <author>Traa</author>
		/// <date>Friday, Mar 10 2006</date>
		private void ClearForm()
		{
			const string METHOD_NAME = THIS + ".ClearForm()";
			try
			{
				dtmPostDate.Value = null;
				txtAvailable.Value = null;
				txtBin.Text = string.Empty;
				txtBin.Tag = null;
				txtCode.Text = string.Empty;
				txtCode.Tag = null;
				txtDescription.Text = string.Empty;
				txtLocation.Text = string.Empty;
				txtLocation.Tag = null;
				txtOrderNo.Text = string.Empty;
				txtOrderNo.Tag = null;
				txtQuantity.Value = null;
				txtRevision.Text = string.Empty;
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// btnAdd_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 3 2006</date>
		private void btnAdd_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnAdd_Click()";
			try
			{
				FormMode = EnumAction.Add;
				ClearForm();
				SwitchFormMode();
				//InitForm
				dtmPostDate.Value = new UtilsBO().GetDBDate();
				txtOrderNo.Text = FormControlComponents.GetNoByMask(this);
				//BindDataToGrid(0, null);
				dstData = boRecoverable.ListByMasterID(0);
				dgrdData.DataSource = dstData.Tables[0];
				FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
				ConfigGrid(false);
				dtmPostDate.Focus();
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// dtmPostDate_Leave
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Monday, April 17 2006</date>
		private void dtmPostDate_Leave(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dtmPostDate_Leave()";
			try 
			{
				if (txtBin.Text.Trim() != string.Empty)
				{
//					decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//						Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
					decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
						Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));					
					txtQuantity.Value = txtAvailable.Value = decAvailableQuantityBin;
				}
				else
				{
					if (txtLocation.Text.Trim() != string.Empty)
					{
//						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), 0, Convert.ToInt32(txtCode.Tag));
						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), 0, Convert.ToInt32(txtCode.Tag));
						txtQuantity.Value = txtAvailable.Value = decAvailableQuantityBin;
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		/// <summary>
		/// dgrdData_ButtonClick
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void dgrdData_ButtonClick(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_ButtonClick()";
			try
			{
				DataRowView drwResult = null;
				Hashtable htbCondition= new Hashtable();
				string strWhereClause = string.Empty;
				if (!btnSave.Enabled) return;
				//Select Item
				if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD])
					|| dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD]))
				{
					if (txtCode.Text.Trim() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALRECEIPT_SELECT_PRODUCT, MessageBoxIcon.Warning);
						txtCode.Focus();
						return;
					}
					else
					{
						strWhereClause += ITM_ProductTable.PRODUCTID_FLD + " != " + txtCode.Tag.ToString();
						strWhereClause += " AND ((ParentProductID = " + txtCode.Tag.ToString() + " and MakeItem = 1) OR MakeItem = 0)";
					}
					string strCode = string.Empty, strDescription = string.Empty;
					if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
					{
						if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
							strCode = dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString();
						else
							strDescription = dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD].ToString();
//						if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
//							drwResult = FormControlComponents.OpenSearchForm(VIEW_PRODUCTINFOR, PART_NUMBER, dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString(), strWhereClause);
//						else
//							drwResult = FormControlComponents.OpenSearchForm(VIEW_PRODUCTINFOR, PART_NAME, dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD].ToString(), strWhereClause);
					}
					else
					{
						if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
							strCode = dgrdData.Columns[ITM_ProductTable.CODE_FLD].Text.Trim();
						else
							strDescription = dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Text.Trim();
//						if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
//							drwResult = FormControlComponents.OpenSearchForm(VIEW_PRODUCTINFOR, PART_NUMBER, dgrdData.Columns[ITM_ProductTable.CODE_FLD].Text.Trim(), strWhereClause);
//						else
//							drwResult = FormControlComponents.OpenSearchForm(VIEW_PRODUCTINFOR, PART_NAME, dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Text.Trim(), strWhereClause);
					}
					SelectItems frmSelectItem = new SelectItems(Convert.ToInt32(txtCode.Tag), strCode, strDescription);
					if (frmSelectItem.ShowDialog() == DialogResult.OK)
						drwResult = frmSelectItem.drvReturnDataRowView;
					
					if (drwResult != null)
					{
						dgrdData.EditActive = true;
						FillItemDataToGrid(drwResult.Row);
					}
				}
				//Select Location, Bin
				if ((dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD]))
					&& (dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() == string.Empty))
				{
					if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
					{
						drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString(), htbCondition, true);
					}
					else
					{
						drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Text.Trim(), htbCondition, true);
					}	
					if (drwResult != null)
					{
						dgrdData.EditActive = true;
						if ((dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] != null)
							&&(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] != DBNull.Value))
						{
							if (int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString()))
							{
								dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = string.Empty;
								dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value = string.Empty;
							}
						}
						dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Value = drwResult[MST_LocationTable.CODE_FLD].ToString(); 
						dgrdData.Columns[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].Value = int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString()); 
					}
				}
				//select Bin
				if ((dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD]))
					&& (dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() == string.Empty))
				{
					
					if (dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] == DBNull.Value
						|| dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString().Trim() == string.Empty
						|| int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) == 0)
					{
						//MessageBox.Show("Please select the Location first");
						PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALRECEIPT_SELECT_LOCATION, MessageBoxIcon.Warning);
						dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD]);
						dgrdData.Focus();
						dgrdData.Select();
						return;
					}
					else
					{
						htbCondition.Add(MST_BINTable.LOCATIONID_FLD, int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()));
					}
					string strConditionValue = ((int)BinTypeEnum.OK).ToString();
					strConditionValue += "' OR " + MST_BINTable.TABLE_NAME + "." + MST_BINTable.BINTYPEID_FLD + "='" + (int)BinTypeEnum.IN;
					htbCondition.Add(MST_BINTable.BINTYPEID_FLD, strConditionValue);
					if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
					{
						drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString(), htbCondition, true);
					}
					else
					{
						drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Text.Trim(), htbCondition, true);
					}	
					if (drwResult != null)
					{
						dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = drwResult[MST_BINTable.CODE_FLD].ToString(); 
						dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value = int.Parse(drwResult[MST_BINTable.BINID_FLD].ToString()); 
					}
				}
				//Select Vendor
				if ((dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD]))
					&& ((dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString() == string.Empty)
					&& (dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString() == string.Empty)))
				{
					htbCondition.Add(CUSTOMER, (int)PartyTypeEnum.CUSTOMER);
					if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
					{
						drwResult = FormControlComponents.OpenSearchForm(V_VENDOR_CUSTOMER, MST_PartyTable.CODE_FLD, dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString(), htbCondition, true);
					}
					else
					{
						drwResult = FormControlComponents.OpenSearchForm(V_VENDOR_CUSTOMER, MST_PartyTable.CODE_FLD, dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Text.Trim(), htbCondition, true);
					}	
					if (drwResult != null)
					{
						dgrdData.EditActive = true;
						dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Value = drwResult[MST_PartyTable.CODE_FLD].ToString(); 
						dgrdData.Columns[CST_RecoverMaterialDetailTable.PARTYID_FLD].Value = int.Parse(drwResult[MST_PartyTable.PARTYID_FLD].ToString()); 
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		
		/// <summary>
		/// Fill data for item after selected
		/// </summary>
		/// <param name="pdrowData"></param>
		private void FillItemDataToGrid(DataRow pdrowData)
		{
			try
			{
				dgrdData.EditActive = true;
				dgrdData.Columns[SO_DeliveryScheduleTable.LINE_FLD].Value = dgrdData.Row + 1;
				dgrdData.Columns[ITM_ProductTable.PRODUCTID_FLD].Value = int.Parse(pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString());
				dgrdData.Columns[ITM_ProductTable.CODE_FLD].Value = pdrowData[PART_NUMBER];
				dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Value	= pdrowData[PART_NAME];
				dgrdData.Columns[ITM_ProductTable.REVISION_FLD].Value = pdrowData[MODEL];
				dgrdData.Columns[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD].Value  = pdrowData[UM];
				dgrdData.Columns[CST_RecoverMaterialDetailTable.UNITOFMEASUREID_FLD].Value  = pdrowData[ITM_ProductTable.STOCKUMID_FLD];
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}

		}
		/// <summary>
		/// ConfigGrid
		/// </summary>
		/// <param name="pblnLock"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 3 2006</date>
		private void ConfigGrid(bool pblnLock)
		{
			try
			{
				dgrdData.Enabled = true;
				for (int i =0; i <dgrdData.Splits[0].DisplayColumns.Count; i++)
				{
					dgrdData.Splits[0].DisplayColumns[i].Locked = true;
				}
				dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Locked = pblnLock;
				dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.DESCRIPTION_FLD].Locked = pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Locked = pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Locked = pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Locked = pblnLock;

				dgrdData.Splits[0].DisplayColumns[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD].DataColumn.NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
				dgrdData.Splits[0].DisplayColumns[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;
				dgrdData.Splits[0].DisplayColumns[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD].Locked = pblnLock;
				
				dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Button = !pblnLock;
				dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.DESCRIPTION_FLD].Button = !pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Button = !pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Button = !pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Button = !pblnLock;
				dgrdData.Splits[0].DisplayColumns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Button = !pblnLock;
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// Bind data to grid
		/// </summary>
		/// <param name="pintMasterID"></param>
		/// <param name="pdstSource"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		public void BindDataToGrid(int pintMasterID, DataSet pdstSource)
		{
			dstData = new DataSet() ;
			//if (txtQuantity.Text.Trim() == string.Empty) return;
			decimal decQuantity = 0;
			try
			{
				decQuantity = decimal.Parse(txtQuantity.Value.ToString());
			}
			catch
			{}
			if (pdstSource == null)
			{
				dstData = boRecoverable.ListByMasterID(pintMasterID);
			}
			else
			{
				
				if (pdstSource.Tables[0].Rows.Count != 0)
				{
					//Calculate Recoverable Quantity
					foreach (DataRow drow in pdstSource.Tables[0].Rows)
					{
						if (drow.RowState == DataRowState.Deleted) continue;
						drow[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD] = (decQuantity * (decimal)drow[ITM_BOMTable.QUANTITY_FLD]);
					}
				}
				dstData	= pdstSource.Copy();
				for (int i = 0; i <dstData.Tables[0].Rows.Count; i++)
				{
					dstData.Tables[0].Rows[i][SO_DeliveryScheduleTable.LINE_FLD] = i+1;
				}
			}
			
			dgrdData.DataSource = dstData.Tables[0];
			FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
			ConfigGrid(false);
			
		}

		/// <summary>
		/// txtLocation_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void txtLocation_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtLocation_Validating()";
			try
			{
				if (txtLocation.Text.Trim() == string.Empty)
				{
					//clear form 
					txtLocation.Tag = null;
					lblLocation.Tag = null;
					txtBin.Text = string.Empty;
					txtBin.Tag = null;
					txtQuantity.Value = null;
					txtAvailable.Value = null;
					return;
				}
				if (!txtLocation.Modified) return;
				DataRowView drwResult = null;
				Hashtable htbCondition = new Hashtable();
				drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtLocation.Text, htbCondition, false);
				if (drwResult != null)
				{
					if (txtLocation.Tag != null)
					{
						if (txtLocation.Tag.ToString() != drwResult[MST_LocationTable.LOCATIONID_FLD].ToString())
						{
							//Clear Bin
							txtBin.Text = string.Empty;
							txtBin.Tag = null;
						}
					}
					txtLocation.Text = drwResult[MST_LocationTable.CODE_FLD].ToString();
					lblLocation.Tag = drwResult[MST_LocationTable.MASTERLOCATIONID_FLD];
					txtLocation.Tag = int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString());
				}
				else 
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// txtBin_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void txtBin_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtBin_Validating()";
			try
			{
				if(txtBin.Text.Trim() == string.Empty)
				{
					txtBin.Tag = null;
					txtAvailable.Value = null;
					txtQuantity.Value = null;
					return;
				}
				if (!txtBin.Modified) return;
				DataRowView drwResult = null;
				Hashtable htbCondition = new Hashtable();
				
				if (txtLocation.Tag != null)
				{
					htbCondition.Add(MST_BINTable.LOCATIONID_FLD, txtLocation.Tag.ToString());
					htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.LS);
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Warning);
					e.Cancel = true;
				}
				drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtBin.Text, htbCondition, false);
				if (drwResult != null)
				{
					txtBin.Text = drwResult[MST_BINTable.CODE_FLD].ToString();
					txtBin.Tag = int.Parse(drwResult[MST_BINTable.BINID_FLD].ToString());
					if (txtCode.Tag != null)
					{
//						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()),
//							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
						decimal decAvailableQuantityBin = new InventoryUtilsBO().GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()),
							Convert.ToInt32(lblLocation.Tag), Convert.ToInt32(txtLocation.Tag.ToString()), Convert.ToInt32(txtBin.Tag), Convert.ToInt32(txtCode.Tag));
						txtQuantity.Value = txtAvailable.Value = decAvailableQuantityBin;	
					}
				}
				else 
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// txtCode_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void txtCode_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtCode_Validating()";
			try 
			{
				if (txtCode.Text.Trim() == string.Empty)
				{
					txtCode.Tag = null;
					txtCode.Text = string.Empty;
					txtDescription.Text = string.Empty;
					txtRevision.Text = string.Empty;
					txtAvailable.Value = null;
					txtQuantity.Value = null;
					//Clear grid
					BindDataToGrid(0, boRecoverable.ListBomOfProduct(0));
					return;
				}
				if (!txtCode.Modified) return;
				DataRowView drwResult = null;
				Hashtable htbConditon = new Hashtable();
				if (cboCCN.SelectedValue != null)
				{
					htbConditon.Add(ITM_ProductTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
					e.Cancel = true;
				}
				htbConditon.Add(ITM_ProductTable.MAKEITEM_FLD, 1);
				drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.CODE_FLD, txtCode.Text, htbConditon, false);
				if (drwResult != null)
				{
					FillDataFromDataRowViewToControls(drwResult);
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// txtDescription_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void txtDescription_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtDescription_Validating()";
			try 
			{
				if (txtDescription.Text.Trim() == string.Empty)
				{
					txtCode.Tag = null;
					txtCode.Text = string.Empty;
					txtDescription.Text = string.Empty;
					txtRevision.Text = string.Empty;
					txtAvailable.Value = null;
					txtQuantity.Value = null;
					//Clear grid
					BindDataToGrid(0, boRecoverable.ListBomOfProduct(0));
					return;
				}
				if (!txtDescription.Modified) return;
				DataRowView drwResult = null;
				Hashtable htbConditon = new Hashtable();
				if (cboCCN.SelectedValue != null)
				{
					htbConditon.Add(ITM_ProductTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
				}
				else
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
					e.Cancel = true;
				}
				htbConditon.Add(ITM_ProductTable.MAKEITEM_FLD, 1);
				drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.DESCRIPTION_FLD, txtDescription.Text, htbConditon, false);
				if (drwResult != null)
				{
					FillDataFromDataRowViewToControls(drwResult);
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// txtQuantity_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void txtQuantity_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtQuantity_Validating()";
			try 
			{
				if (txtQuantity.Text.Trim() == string.Empty)
					return;
				Decimal decQuantity = 0;
				try
				{
					decQuantity = decimal.Parse(txtQuantity.Value.ToString());
				}
				catch
				{
					
				}
				
				if (decQuantity <= 0)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_WO_ORDERQUANTITY, MessageBoxIcon.Warning);
					e.Cancel = true;
				}
				if (txtAvailable.Text.Trim() != string.Empty)
				{
					Decimal decAvailableQty = 0;
					try
					{
						decAvailableQty = decimal.Parse(txtAvailable.Value.ToString());
					}
					catch
					{
						
					}
					
					if (decQuantity > decAvailableQty)
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_MRB_OTHER_QUANTITY, MessageBoxIcon.Warning);
						e.Cancel = true;
					}
				
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// btnClose_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void btnClose_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}
		/// <summary>
		/// dgrdData_BeforeColUpdate
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void dgrdData_BeforeColUpdate(object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeColUpdate()";
			try 
			{
				Hashtable htbCriteria = new Hashtable();
				DataRowView drwResult = null;
				string strWhereClause = string.Empty;
				switch (e.Column.DataColumn.DataField)
				{
					case ITM_ProductTable.CODE_FLD:
					case ITM_ProductTable.DESCRIPTION_FLD:
						# region Open ComName search form
						if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
						{
							if (txtCode.Text.Trim() == string.Empty)
							{
								PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALRECEIPT_SELECT_PRODUCT, MessageBoxIcon.Warning);
								e.Cancel = true;
								return;
							}
							else
							{
								strWhereClause += ITM_ProductTable.PRODUCTID_FLD + " != " + txtCode.Tag.ToString();
								strWhereClause += " AND ((ParentProductID = " + txtCode.Tag.ToString() + " and MakeItem = 1) OR MakeItem = 0)";
							}
							string strCode = string.Empty, strDescription = string.Empty;
							if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
							{
								if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
									strCode = dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString();
								else
									strDescription = dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD].ToString();
							}
							else
							{
								if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD]))
									strCode = dgrdData.Columns[ITM_ProductTable.CODE_FLD].Text.Trim();
								else
									strDescription = dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Text.Trim();
							}
							SelectItems frmSelectItem = new SelectItems(Convert.ToInt32(txtCode.Tag), strCode, strDescription);
							if (frmSelectItem.ShowDialog() == DialogResult.OK)
								drwResult = frmSelectItem.drvReturnDataRowView;
							if (drwResult != null)
							{
								e.Column.DataColumn.Tag = drwResult.Row;	
							}
							else
							{
								e.Cancel = true;
							}
						}
						#endregion
						break;
					case MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD:
						# region Open Location search form
						if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
						{
							if (dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() != string.Empty)
							{
								return;
							}
							drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
							if (drwResult != null)
							{
								e.Column.DataColumn.Tag = drwResult.Row;	
							}
							else
							{
								e.Cancel = true;
							}
						}
						else
						{
							//Clear Bin
							dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = string.Empty;
							//dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Value = string.Empty;
							dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value = null;
							dgrdData.Columns[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].Value = null;
							//dgrdData.Refresh();

						}
						#endregion
						break;
					case MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD:
						# region Open Bin search form
						if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
						{
							if (dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() != string.Empty)
							{
								return;
							}
							//User has entered Location
							if (dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString() != string.Empty
								&& int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != 0)
							{
								htbCriteria.Add(MST_BINTable.LOCATIONID_FLD, int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()));
							}
							else //User has not entered Location
							{
								PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_LOCATION, MessageBoxIcon.Warning);
								dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD]);
								dgrdData.Focus();
								return;
							}
							string strConditionValue = ((int)BinTypeEnum.OK).ToString();
							strConditionValue += "' OR " + MST_BINTable.TABLE_NAME + "." + MST_BINTable.BINTYPEID_FLD + "='" + (int)BinTypeEnum.IN;
							htbCriteria.Add(MST_BINTable.BINTYPEID_FLD, strConditionValue);
							drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
							if (drwResult != null)
							{
								e.Column.DataColumn.Tag = drwResult.Row;	
							}
							else
							{
								e.Cancel = true;
							}
						}
						#endregion
						break;
					case MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD:
						# region Open Party search form
						if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
						{
							if (((dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString() != string.Empty)
								//&&(int.Parse(dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString()) != 0))
								&&(int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != 0))
								||((dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString() != string.Empty)
								//&& (int.Parse(dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString()) != 0)))
								&& (int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) != 0)))
							{
								return;
							}
							drwResult = FormControlComponents.OpenSearchForm(V_VENDOR_CUSTOMER, MST_PartyTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
							if (drwResult != null)
							{
								e.Column.DataColumn.Tag = drwResult.Row;	
							}
							else
							{
								e.Cancel = true;
							}
						}
						#endregion
						break;
					case CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD:
						# region Check Quantity
						if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
						{
							if (e.Column.DataColumn.Text == string.Empty)
							{
								return;
							}
							try
							{
								if (decimal.Parse(e.Column.DataColumn.Text) <= 0)
								{
									PCSMessageBox.Show(ErrorCode.MESSAGE_WO_ORDERQUANTITY, MessageBoxIcon.Warning);
									e.Cancel = true;
								}
							}
							catch
							{
								e.Cancel = true;
							}
						}
						#endregion
						break;
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// dgrdData_AfterColUpdate
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private void dgrdData_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
			try 
			{
				DataRow drwResult = (DataRow) e.Column.DataColumn.Tag;
				//Fill Data to ComNumber
				if (e.Column.DataColumn.DataField == ITM_ProductTable.CODE_FLD)
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString() == string.Empty))
					{
						dgrdData.Columns[ITM_ProductTable.CODE_FLD].Value = string.Empty;
						dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Value = string.Empty;
						dgrdData.Columns[ITM_ProductTable.REVISION_FLD].Value = string.Empty;
						dgrdData.Columns[ITM_ProductTable.PRODUCTID_FLD].Value = null;
						dgrdData.Columns[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD].Value = string.Empty;
					}
					else
					{
						dgrdData.EditActive = true;
						FillItemDataToGrid(drwResult);
						
					}
				}
				//Fill Data to ComName
				if(e.Column.DataColumn.DataField == ITM_ProductTable.DESCRIPTION_FLD)
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD].ToString() == string.Empty))
					{
						dgrdData.Columns[ITM_ProductTable.CODE_FLD].Value = string.Empty;
						dgrdData.Columns[ITM_ProductTable.DESCRIPTION_FLD].Value = string.Empty;
						dgrdData.Columns[ITM_ProductTable.REVISION_FLD].Value	 = string.Empty;
						dgrdData.Columns[ITM_ProductTable.PRODUCTID_FLD].Value = null;
						dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Value = string.Empty;
					}
					else
					{
						dgrdData.EditActive = true;

						FillItemDataToGrid(drwResult);
					}
				}
				//Fill Data to Location
				if (e.Column.DataColumn.DataField == MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD)
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString() == string.Empty))
					{
						
					}
					else
					{
						if ((dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] != null)
							&&(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] != DBNull.Value))
						{
							if (int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString()))
							{
								dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = string.Empty;
								dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value = string.Empty;
							}
						}
						dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Value = drwResult[MST_LocationTable.CODE_FLD].ToString();
						dgrdData.Columns[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].Value = int.Parse(drwResult[MST_LocationTable.LOCATIONID_FLD].ToString());
					}
				}
				//Fill Data to Bin
				if (e.Column.DataColumn.DataField.ToLower() == (MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD).ToLower())
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString() == string.Empty))
					{
						dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = string.Empty;
						dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value	 = null;
					}
					else
					{
						dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Value = drwResult[MST_BINTable.CODE_FLD];
						dgrdData.Columns[CST_RecoverMaterialDetailTable.TOBINID_FLD].Value = int.Parse(drwResult[MST_BINTable.BINID_FLD].ToString());
					}
				}
				//Fill Data to Customer
				if (e.Column.DataColumn.DataField == MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD)
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() == string.Empty))
					{
						dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Value = string.Empty;
						dgrdData.Columns[CST_RecoverMaterialDetailTable.PARTYID_FLD].Value = string.Empty;
					}
					else
					{
						dgrdData.Columns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Value = drwResult[MST_PartyTable.CODE_FLD];
						dgrdData.Columns[CST_RecoverMaterialDetailTable.PARTYID_FLD].Value = int.Parse(drwResult[MST_PartyTable.PARTYID_FLD].ToString());
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// ValidateData
		/// </summary>
		/// <returns></returns>
		/// <author>Trada</author>
		/// <date>Thursday, Mar 2 2006</date>
		private bool ValidateData()
		{
			const string METHOD_NAME = THIS + ".ValidateData()";
			try
			{
				if (FormControlComponents.CheckMandatory(dtmPostDate))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					dtmPostDate.Focus();
					dtmPostDate.Select();
					return false;
				}
				if (!FormControlComponents.CheckDateInCurrentPeriod((DateTime)dtmPostDate.Value))
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE_PERIOD);
					dtmPostDate.Focus();
					dtmPostDate.Select();
					return false;
				}
				//check the PostDate smaller than the current date
				if ((DateTime)dtmPostDate.Value > new UtilsBO().GetDBDate())
				{
					//MessageBox.Show("The Post Date you input is not in the current period");
					PCSMessageBox.Show(ErrorCode.MESSAGE_INV_TRANSACTION_CANNOT_IN_FUTURE,MessageBoxIcon.Warning);
					dtmPostDate.Focus();
					return false;
				}
				if (FormControlComponents.CheckMandatory(cboCCN))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					cboCCN.Focus();
					cboCCN.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtOrderNo))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtOrderNo.Focus();
					txtOrderNo.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtLocation))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtLocation.Focus();
					txtLocation.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtBin))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtBin.Focus();
					txtBin.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtCode))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtCode.Focus();
					txtCode.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtDescription))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtDescription.Focus();
					txtDescription.Select();
					return false;
				}
				if (FormControlComponents.CheckMandatory(txtQuantity))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					txtQuantity.Focus();
					txtQuantity.Select();
					return false;
				}
				if (txtQuantity.Text != string.Empty)
				{
					if ((decimal)txtQuantity.Value == 0)
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_WO_ORDERQUANTITY, MessageBoxIcon.Warning);
						txtQuantity.Focus();
						txtQuantity.Select();
						return false;	
					}
				}
				//check data in the grid
				if (dgrdData.RowCount == 1)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_PLEASE_ENTER_DETAIL_INFOR, MessageBoxIcon.Warning);
					dgrdData.Focus();
					return false;
				}
				for (int i = 0; i < dgrdData.RowCount - 1; i++)
				{
					if (dgrdData[i, ITM_ProductTable.CODE_FLD].ToString() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_BOM_COMPONENTNOTEXIST, MessageBoxIcon.Warning);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD]);
						dgrdData.Focus();
						return false;
					}
					if (dgrdData[i, ITM_ProductTable.DESCRIPTION_FLD].ToString() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_BOM_COMPONENTNOTEXIST, MessageBoxIcon.Warning);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.DESCRIPTION_FLD]);
						dgrdData.Focus();
						return false;
					}
					if (dgrdData[i, CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD].ToString() == string.Empty)
					{
						string[] strParam = new string[1];
						strParam[0] = RECOVERABLE_QTY;
						PCSMessageBox.Show(ErrorCode.MESSAGE_MANDATORY_FIELD_REQUIRED, MessageBoxIcon.Warning, strParam);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD]);
						dgrdData.Focus();
						return false;
					}
					else
					{
						if (decimal.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD].ToString()) <= 0)
						{
							string[] strParam = new string[2];
							strParam[0] = RECOVERABLE_QTY;
							strParam[1] = 0.ToString();
							PCSMessageBox.Show(ErrorCode.MESSAGE_GREATER_THAN, MessageBoxIcon.Warning, strParam);
							dgrdData.Row = i;
							dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[CST_RecoverMaterialDetailTable.RECOVERQUANTITY_FLD]);
							dgrdData.Focus();
							return false;	
						}
					}
					if ((dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString() == string.Empty)
						&&(dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString() == string.Empty)
						&&(dgrdData[i, CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString() == string.Empty))
					{
						string[] strParam = new string[1];
						strParam[0] = LOC_OR_VENDOR;
						PCSMessageBox.Show(ErrorCode.MESSAGE_MANDATORY_FIELD_REQUIRED, MessageBoxIcon.Warning, strParam);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD]);
						dgrdData.Focus();
						return false;
					}
					if ((dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString() != string.Empty)
						&& (int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != 0))
					{
						if ((dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString() == string.Empty)
							||(int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) == 0))
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_MUST_SELECT_BIN_FOR_LOCATION, MessageBoxIcon.Warning);
							dgrdData.Row = i;
							dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD]);
							dgrdData.Focus();
							return false;
						}
					}
					
					if ((dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString() != string.Empty)
						&&(dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString() != string.Empty)
						&&(dgrdData[i, CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString() != string.Empty))
					{
						if ((int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) == 0)
						&&(int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) == 0)
						&&(int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString()) == 0))
						{
							string[] strParam = new string[1];
							strParam[0] = LOC_OR_VENDOR;
							PCSMessageBox.Show(ErrorCode.MESSAGE_MANDATORY_FIELD_REQUIRED, MessageBoxIcon.Warning, strParam);
							dgrdData.Row = i;
							dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD]);
							dgrdData.Focus();
							return false;
						}
						if ((int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) == 0)
							&&(int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != 0)
							&&(int.Parse(dgrdData[i, CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString()) == 0))
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_MUST_SELECT_BIN_FOR_LOCATION, MessageBoxIcon.Warning);
							dgrdData.Row = i;
							dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD]);
							dgrdData.Focus();
							return false;
						}
					}
				}
				//Check postdate in configuration
				if (!FormControlComponents.CheckPostDateInConfiguration((DateTime)dtmPostDate.Value))
				{
					return false;
				}
				return true;
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		
		/// <summary>
		/// btnSave_Click
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, </date>
		private void btnSave_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSave_Click()";
			try 
			{
				if (PCSMessageBox.Show(ErrorCode.MESSAGE_CONFIRM_BEFORE_SAVE_DATA, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
				{
					blnHasError = true;
					if (!dgrdData.EditActive && ValidateData())
					{
						//Assign value to MasterVO
						voRecoverMaterialMaster = new CST_RecoverMaterialMasterVO();
						voRecoverMaterialMaster.CCNID = SystemProperty.CCNID;
						voRecoverMaterialMaster.MasterLocationID = SystemProperty.MasterLocationID;
						voRecoverMaterialMaster.FromBinID = int.Parse(txtBin.Tag.ToString());
						voRecoverMaterialMaster.FromLocationID = int.Parse(txtLocation.Tag.ToString());
						voRecoverMaterialMaster.PostDate = (DateTime) dtmPostDate.Value;
						voRecoverMaterialMaster.ProductID = int.Parse(txtCode.Tag.ToString());
						voRecoverMaterialMaster.Quantity = (decimal)txtQuantity.Value;
						voRecoverMaterialMaster.AvailableQty = (decimal)txtAvailable.Value;
						voRecoverMaterialMaster.TransNo = txtOrderNo.Text;
						voRecoverMaterialMaster.UserName = SystemProperty.UserName;
						//Save to database
						//New a dataset to update
						DataSet dstToUpdate = dstData.Clone();
						foreach (DataRow drow in dstData.Tables[0].Rows)
						{
							if (drow.RowState == DataRowState.Deleted) continue;
							DataRow drowData = dstToUpdate.Tables[0].NewRow();
							drowData.ItemArray = drow.ItemArray;
							dstToUpdate.Tables[0].Rows.Add(drowData);
						}
						//Reset ToBinID, ToLocationID, PartyID if needed
						foreach(DataRow drow in dstToUpdate.Tables[0].Rows)
						{
							if ((drow[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString() != string.Empty)
								&& (drow[CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString() != string.Empty))
							{
								if ((int.Parse(drow[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) == 0) 
									&& (int.Parse(drow[CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) == 0))
								{
									drow[CST_RecoverMaterialDetailTable.TOBINID_FLD] = DBNull.Value;
									drow[CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD] = DBNull.Value;
								}
							}
							if ((drow[CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString() != string.Empty)
								&& (int.Parse(drow[CST_RecoverMaterialDetailTable.PARTYID_FLD].ToString()) == 0))
							{
								drow[CST_RecoverMaterialDetailTable.PARTYID_FLD] = DBNull.Value;
							}
							
						}
						intRecoverableMasterID = boRecoverable.AddAndReturnID(voRecoverMaterialMaster, dstToUpdate);
						PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA);
						FormMode = EnumAction.Default;
						SwitchFormMode();
						//reload grid form database
						dstData = boRecoverable.ListByMasterID(intRecoverableMasterID);
						//update Line column
						if (dstData.Tables[0].Rows.Count > 0)
						{
							for (int i = 0; i < dstData.Tables[0].Rows.Count; i++)
							{
								dstData.Tables[0].Rows[i][PRO_WorkOrderDetailTable.LINE_FLD] = i + 1;
							}
						}
						dgrdData.DataSource = dstData.Tables[0];
						//restore the layout of grid
						FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
						//Lock grid
						for (int i =0; i <dgrdData.Splits[0].DisplayColumns.Count; i++)
						{
							dgrdData.Splits[0].DisplayColumns[i].Locked = true;
						}
						ConfigGrid(true);
						dgrdData.Refresh();
						blnHasError = false;
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// txtOrderNo_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 3 2006</date>
		private void txtOrderNo_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtOrderNo_Validating()";
			try 
			{
				if (btnOrderNo.Enabled)
				{
					if (txtOrderNo.Text.Trim() == string.Empty)
					{
						//ClearForm();
						dtmPostDate.Value = null;
						txtLocation.Text = string.Empty;
						txtLocation.Tag = null;
						txtBin.Text = string.Empty;
						txtBin.Tag = null;
						txtCode.Text = string.Empty;
						txtDescription.Text = string.Empty;
						txtRevision.Text = string.Empty;
						txtCode.Tag = null;
						txtQuantity.Value = null;
						txtAvailable.Value = null;
						dstData = boRecoverable.ListByMasterID(0);
						txtOrderNo.Tag = null;
						dgrdData.DataSource = dstData.Tables[0];
						FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
						return;
					}
					if (!txtOrderNo.Modified) return;
					DataRowView drwResult = null;
					Hashtable htbCondition = new Hashtable();
				
					if (cboCCN.SelectedValue != null)
					{
						htbCondition.Add(cst_FreightMasterTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
					}
					else
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
						cboCCN.Focus();
						return;
					}
					drwResult = FormControlComponents.OpenSearchForm(VIEW_RECOVERABLEMATERIALMASTER, CST_RecoverMaterialMasterTable.TRANSNO_FLD, txtOrderNo.Text.Trim(), htbCondition, false);
					if (drwResult != null)
					{
						txtOrderNo.Text = drwResult[CST_RecoverMaterialMasterTable.TRANSNO_FLD].ToString();
						txtOrderNo.Tag = int.Parse(drwResult[CST_RecoverMaterialMasterTable.RECOVERMATERIALMASTERID_FLD].ToString());
						FillDataToAllControls(int.Parse(txtOrderNo.Tag.ToString()));
					}
					else
						e.Cancel = true;
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// RecoverableMaterial_Closing
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <AUTHOR>Trada</AUTHOR>
		/// <date>Friday, Mar 3 2006</date>
		private void RecoverableMaterial_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".RecoverableMaterial_Closing()";
			try
			{
				if (FormMode != EnumAction.Default)
				{
					DialogResult confirmDialog = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
					switch (confirmDialog)
					{
						case DialogResult.Yes:
							//Save before exit
							btnSave_Click(btnSave, new EventArgs());
							if (blnHasError)
							{
								e.Cancel = true;
							}
							break;
						case DialogResult.No:
							break;
						case DialogResult.Cancel:
							e.Cancel = true;
							break;
					}
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
		}

		
		private void txtOrderNo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if((e.KeyCode == Keys.F4) && (btnOrderNo.Enabled))
			{
				btnOrderNo_Click(sender, e);
			}
		}

		private void txtLocation_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if(e.KeyCode == Keys.F4) 
			{
				btnLocation_Click(sender, e);
			}
		}

		private void txtBin_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if(e.KeyCode == Keys.F4) 
			{
				btnBin_Click(sender, e);
			}
		}

		private void txtCode_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if(e.KeyCode == Keys.F4) 
			{
				btnSearchProductCode_Click(sender, e);
			}
		}

		private void txtDescription_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if(e.KeyCode == Keys.F4) 
			{
				btnSearchProductDescription_Click(sender, e);
			}
		}
		/// <summary>
		/// dgrdData_KeyDown
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Friday, Mar 10 2006</date>
		private void dgrdData_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.Delete)
				{
					if (btnSave.Enabled)
					{
						FormControlComponents.DeleteMultiRowsOnTrueDBGrid(dgrdData);
						int intCount  =0;
						foreach (DataRow objRow in dstData.Tables[0].Rows)
						{
							if(objRow.RowState != DataRowState.Deleted) 
								intCount++;
						}
						for (int i =0; i <intCount; i++)
							dgrdData[i, PRO_WorkOrderDetailTable.LINE_FLD] = i+1;
						
						dgrdData.Refresh();
						return;
					
					}
				}
				if (e.KeyCode == Keys.F4)
				{
					if (btnSave.Enabled)
					{
						dgrdData_ButtonClick(sender, null);
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
		}

		/// <summary>
		/// Displays Recycled Slip
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnPrint_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnPrint_Click()";
			const int MAX_ROW = 30;
			const string NO_FLD = "No";
			try
			{
				if (intRecoverableMasterID == 0)
					return;
				string REPORT_FILE = Application.StartupPath + @"\ReportDefinition\RecycledSlip.xml";
				if (!File.Exists(REPORT_FILE))
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_REPORT_FILE_NOT_FOUND, MessageBoxButtons.OK, MessageBoxIcon.Error);
					return;
				}
				// if in grid has more than one to location or to bin, display error message and exit
				if (dstData == null || dstData.Tables.Count == 0)
					return;
				int intMasterID = Convert.ToInt32(txtOrderNo.Tag);
				bool blnHasMultiDest = boRecoverable.HasMultiDestination(intMasterID);
				if (blnHasMultiDest)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RECYCLED_HAS_MORE_THAN_ONE_DESTINATION, MessageBoxButtons.OK, MessageBoxIcon.Error);
					return;
				}
				// gets report data
				DataTable dtbReportData = boRecoverable.GetDataForSlip(intMasterID);
				// insert No column
				dtbReportData.Columns.Add(new DataColumn(NO_FLD, typeof(int)));
				dtbReportData.Columns[NO_FLD].AllowDBNull = true;
				dtbReportData.Columns[NO_FLD].DefaultValue = DBNull.Value;
				// numbering
				int intNumber = 1;
				foreach (DataRow drowData in dtbReportData.Rows)
				{
					drowData[NO_FLD] = intNumber;
					intNumber ++;
					// reset row number for next page
					if (intNumber > MAX_ROW)
						intNumber = 1;
				}
				// remainder row of last page
				int intDiff = MAX_ROW - (dtbReportData.Rows.Count % MAX_ROW);
				// insert dummie rows
				for (int i = 0; i < intDiff; i++)
				{
					DataRow drowNew = dtbReportData.NewRow();
					dtbReportData.Rows.Add(drowNew);
				}
				while (rptSlip.IsBusy)
					Application.DoEvents();
				// load report information
				string[] arrstrReportInDefinitionFile = rptSlip.GetReportInfo(REPORT_FILE);
				rptSlip.Load(REPORT_FILE, arrstrReportInDefinitionFile[0]);
				arrstrReportInDefinitionFile = null;
				// bind data to report
				rptSlip.DataSource.Recordset = dtbReportData;
				try
				{
					rptSlip.Fields["fldCompany"].Text = SystemProperty.SytemParams.Get(SystemParam.COMPANY_FULL_NAME);
				}
				catch{}
				// render report
				rptSlip.Render();
				// displays report
				C1PrintPreviewDialog dlgPreview = new C1PrintPreviewDialog();
				dlgPreview.ReportViewer.NavigationPanelVisible = false;
				dlgPreview.ReportViewer.Document = rptSlip.Document;
				dlgPreview.FormTitle = this.Text;
				dlgPreview.Show();
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
		}
		/// <summary>
		/// dgrdData_RowColChange
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Tuesday, Mar 21 2006</date>
		private void dgrdData_RowColChange(object sender, C1.Win.C1TrueDBGrid.RowColChangeEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_RowColChange()";
			try
			{
				if (dgrdData.DataSource == null) return;
				if (((dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString() != string.Empty)
					&&(int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOLOCATIONID_FLD].ToString()) != 0))
					||((dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString() != string.Empty)
					&& (int.Parse(dgrdData[dgrdData.Row, CST_RecoverMaterialDetailTable.TOBINID_FLD].ToString()) != 0)))
				{
					dgrdData.Splits[0].DisplayColumns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Locked = true;
				}
				else
					dgrdData.Splits[0].DisplayColumns[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].Locked = false;

				if (dgrdData[dgrdData.Row, MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString() != string.Empty)
				{
					dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Locked = true;
					dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Locked = true;
				}
				else
				{
					dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Locked = false;
					dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Locked = false;
				}
			}	
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
		}
	}
}
